url-rewriting

What is a fairly easy to implement Url Rewriter for Asp.Net MVC

I am rewriting some of sites in MVC. I am concerned about old links out there, some I know about and some I don't. I am looking for suggestions and code sample on how to make sure that my known and unknown links are not dead. What are your choices? I would eventually like to phase out my old links. I hope to do this by notifying my us...

URL rewrite using .htaccess

I am trying to rewrite the URL From ---> http://www.onnlist.com/punerealestate.jsp?section=realestate&file=pune To -----> myserver/realestate/pune/punerealestate.html my suggested .htaccess is ---> Options +FollowSymlinks RewriteEngine on RewriteRule ^([^/]+)/([^/]+)/punerealestate.html /punerealestate.jsp?section=$1&file=$2 [L]...

Problem with URL rewriting for same .php page

Hello, I'm having some issues with a mod_rewrite rule. I have to make 2 types of links (the first one is for the artists that have an album, the second one is the for the ones that don't): 1) /lyrics/artist-name/album-name/song-name.php 2) /lyrics/artist-name/song-name.php My code looks like this: RewriteRule ^lyrics/(.*)/(.*)/(.*).ph...

Sending custom GET requests in Wordpress as clean url's

I have a page called "user" and on that page I show stats about specyfic user,but the url is like http://somepage.com/user/?u=ID , I want to make http://somepage.com/user/ID , tried htaccess, but no result ...

Sharepoint Changing URL Special characters

I have a URL stored in a Sharepoint 'Link to a document' that contains the Nordic Character 'Ø' as hex(%D8). Sharepoint is encoding the % symbol, (thus making it %25D8). If I enter the URL directly into an address bar, it works fine. If I don't URL encode it, I still get the same problem. Anybody got any ideas? ...

Dynamic URL Rewriting with IIS6

I've been tasked with making an already existing e-commerce site SE friendly - which in this case means (amongst other things) letting the user change the URL for each page/product through the back end. The site is an old asp site running on IIS6. I've started looking into http://www.codeplex.com/IIRF and http://www.helicontech.com/isa...

Htaccess Querystring rewrite

I have URLs like /?test that I want to rewrite to /page.php?page=test I tried like this but for some reason it doesn't work. RewriteRule ^\?([a-z0-9\-\+]{3,20})/?$ /page.php?page=$1 [NC,QSA] What am I doing wrong? ...

htaccess rewrite rules

Hello, I've currently got a web application that I need optimizing, and one of methods or something I'm trying to achieve is such: http://myweb/dept/app from http://myweb/?dept=dept&app=app I've currently this as the PHP code for it: if(empty($_REQUEST['dept'])) { $folder = "apps/"; } else { $folder = str_replace("/"...

Application_BeginRequest for static *.JS files in ASP.NET in IIS6?

I'm trying to do something seemingly simple: ensure that Application_BeginRequest is called for every static *.JS URL sent to my IIS6 website, whether or not the underlying file exists. What's a good way to do this on IIS6 & ASP.NET 3.5, ideally without causing all static files to go through ASP.NET-- only the .JS URLs? If you're cur...

rewrite urls with GET reqs

Hello, how do I configure my .htaccess rewrite rules to accomodate GET requests? Currently, /manager/page goes to: ?dept=manager&n=page however, some pages have additional GET reqs, and so this rule doesn't work: RewriteRule ^([A-Za-z]+)/([A-Za-z]+)$ index.php?dept=$1&n=$2 [QSA] I would need: ?dept=manager&n=page&id&etc=etc to go to:...

Is having a descriptive URL needed to be a web 2.0 website?

Our in-house built CMS system has the ability to have descriptive url (http://stackoverflow.com/questions/889312/descriptive-urls-vs-basic-urls) versus basic urls (http://test.com/index.php?id=34234) We want to know other than giving a little more feedback to crawlers out there, if will mean something else. Do having this descriptiv...

UrlRewritingNet Regex Required

I am trying to use URLRewritingNet to rewrite a website. The entire website is built using physical .aspx pages, and all I require is for them to show up as extensionless. I figured out the extensionless part and all of my root files work fine (~/default.aspx. ~/contact.aspx, etc). The problem comes when I have a physical file in a ph...

what is the regex for url's with parameters?

if i have a <form action='./search' method='get'> with <input type='text' name='keyword' value='this is the search term' />inside after submitting the form, it leads me to /search?keyword=this%20is%20the%search%20term what regex should i use to capture that form of url and rewrite it to /search-this_is_the_search_term ...

Using SEO friendly URLs in ASP.NET

I am in a situation where I want to restructure my site's urls. That is I have a page that lists the article names (with each article name as a link). As shown below: ARTICLE1 ARTICLE2 ARTICLE3 Now if I click on an article I want the url to be as follows: www.domain.com/ArticleID/name-of-the-Article ...

Prevent Javascript in URL attacks (asp.net)

I've seen plenty of Cross-Site Scripting attack prevention suggestions, but I'm not asking about Form Input validation. How would I prevent something like this: javascript:(function(i,j){with(document){for(i=0;i<forms.length;++i){with(forms[i]){for(j=0;j<elements.length;++j){elements[j].disabled=false}}}}})() from being inserted into ...

Rewrite both domain and path

I want to redirect one specific url like: www.example.com/test/ex.gif to static.example.com/ex.gif How can i do this in .htaccess? ...

how to do a URL masking in this condition?

I am using php, js, flash and mysql on 1 website. I want to do a URL masking using frameset(or maybe iframe). Scenario: An user click on a link, which direct him/her to my page with this url: www.domain.com/index.php?var1=string1&var2=string2 How to mask the url so that visitor can only see www.domain.com/index.php, but actually ther...

URL Shortening Site

I am working on a URL shortening site which uses PHP, MySQL and Apache. General idea of URL shortening as I look at open source projects: user gives a URL link and the system gets ID for that link from database. Then convert the ID X base system (I am using base 36). Then use Apache mod_rewrite and create shortened URL and then redirect....

What is the best URL Rewriter to use?

I'm looking for an URL-rewriter to use in my web-site. Does anybody suggest the best one I should use? ...

How to Implement URL Routing with PHP + IIS?

I wrote a content switcher script that uses dynamic URLs to pass parameters indicating what data is to be sent. For example to view the about page you would type: http://www.example.com/?page=about The issue is that this is not user friendly especially in my case where users will not necessarily be accessing this page via a link from t...