Using Mod_Rewrite for Search engine friendly urls

Any database driven website generates dynamic urls which can prove to be the bane of search engine spiders. Lots of e-commerce sites, forums and content management systems all have difficulty in getting indexed properly. Organic listings take a beating in these cases especially if dynamic urls have many variable strings.

Nothing much to worry though for help is round the corner. Especially if you are hosted on a Linux Server. Just take advantage of Apache Mod_rewrite rule whose job is to ensure dynamic urls get transformed to pretty static ones. For example a complex looking dynamic url like http://www.yoursite.com/forums/thread.php?threadid=6789&sort=date will become http://www.yoursite.com/forums/6789/. What actually happens is that when a server request comes for the new static url, the Apache module redirects the URL internally to the old, dynamic URL, while still looking like the new static URL.
It is basically a win-win situation for you. Not only does your url look inviting for the search spiders, but also the user get to understand what the page is all about looking at the url. Additionally you can also ensure keyword rich urls to help in search engine rankings. All you need is to learn how to create rewrite rules in the Apache .htaccess file to get going.
If you want to take a hard look at Mod-Rewrite and take the path toward search friendly urls, just take this redirect towards the ultimate guide for Apache htaccess and mod_rewrite.

If you like the post, do spread the Love

2 comments… add one
  • Critique May 26, 2007 Link Reply

    Hi Cloudtrance,
    Could you please share more information on how to create user-friendly URLs. Given my time constraints, I have not had much luck in understanding the gist and the working pattern. Do share the info on my email id.
    Thanks very much. And keep up the good work.
    Critique

  • Cloudtrance May 28, 2007 Link Reply

    Hi Critique,

    Need more goodies on mod-rewrite..?

    Check out Mod-Rewrite Explained at V7N forums.

Leave a Comment