views:

174

answers:

2

I have a website where my present "geeky" urls look like:

http://www.bestatdubaiholidays.co.uk/pages/Quote/Details.aspx?GUID=01a25b0c-e0ac-40ba-abd1-298f3abd9612

I want to change these to Search Engine Friendly ones - something like:

http://www.bestatdubaiholidays.co.uk/the-palm-atlantis.aspx

or

http://www.bestatdubaiholidays.co.uk/the-palm-atlantis

I have hundreds of incoming links (from ad campaigns and other sites) to my geeky urls that I want to retain.

So if someone types a geeky url, I want the address bar to show the equivalent search engine friendly url.

Can anyone help? Referring to other articles won't help. Believe me, I've read every one of them. Any example urls will be helpful.

A: 

I suggest using a Front controller. This means that you use the rewrite engine of whatever httpd server you're using to redirect ALL requests to a single file (index.php or index.aspx or whathaveyou) and then you use code in that file to dispatch to the appropriate page. You can do a redirect from the geeky URLs to the friendly URLs, and if it's a friendly url then you load the appropriate page.

This would be way easier than writing huge rewrite rules for each type of page you might have. And this way all of the work is done in the same language your site is already running, so you don't have to learn and maintain a new file that is in its own language just for the redirection.

OverloadUT
Redirecting all requests to index - search engines wont even look at my site again. Don't think that's the best idea. Redirect sounds better. Which one should i go for? 301 or 302 redirect?
Arjun
I mean redirect to Search Engine Friendly urls sounds better.
Arjun
No you don't understand. The redirection to index is only a backend thing. The end user will never see the index file, it just happens to be the one to do all of the handling.Technically I shouldn't say redirect. You're rewriting the request so that all requests are sent to front.aspx or whatever.
OverloadUT
A: 

Use something like this http://blog.eworldui.net/post/2008/04/ASPNET-MVC---Legacy-Url-Routing.aspx

You don't have to use MVC, the routing classes are standalone now

TFD