URL Rewriting (Part 1)


During one of the projects I did, I was asked for having URLs like YAHOO or GOOGLE for an intranet application and believe me that before that requirement came out, although I knew that there would've been some technology, but never bothered to check that out.

Since now I've already done it, let me explore in my blog what I've learnt so far, as well as your comments and views are most welcome, and even the corrections.

URL REWRITING is a technique through which you rename/re-write the URLs which are displayed in the web browser's address bar.

There are many advantages of URL rewriting technique.  Following are the listed advantages of the URL re-writing:  

1 - Simplicity.
2 - Security & Hiding the Technology
3 - SEO (Search Engine Optimization)


(Simplicity) Simplified URLs:

Consider a following URL
http://websitename.com/products/productindex.aspx?flag=y&date1=120107&date2=150107&tabid=5&hidepicture=true
If the above URL goes changed to the following...
http://websitename.com/products/listings.apx  ...... then wouldn’t that be fantastic ??

This is an easy to remember as well as simple URL, and we can count it as a plus-point of URL re-writing.

Security & Hiding the Technology: 

Many of you have probably noticed that the dynamic pages hosted by Yahoo or even Google have no extensions for the pages like
mypage.aspx or products.asp, etc. but you can see .htm on Google at some places, where there are some static content coming through the
CMS (may be).

There are many reasons to it, simply it can be said that the extensions of the pages, provide way for the hackers and let them think what they can do.

As well as the query strings can also help them out in different ways.

SEO (Search Engine Optimization):

SEO is a very important base for the success of any website (of the business). And URL rewriting is one very strong aspect of it. Lets try this out with a small example.

Go to http://www.google.com/ and type "Football" in the search box. 

You will notice the following results. 

Listed at 1st Place   : www.football.com/
Listed at 2nd Place : http://news.bbc.co.uk/sport1/hi/football/default.stm
Listed at 3rd Place : http://en.wikipedia.org/wiki/Football_(soccer)
Listed at 3rd Place : http://en.wikipedia.org/wiki/American_football



In the above results, I guess there is very little to explain about, as you can notice the URLs. Not necessarily all the pages which came out of the search are static, but static pages are always top in the queue for search engine as compare to the dynamic pages, I cannot change it for you :)

But if we do have a search engine friendly URL, it would definitely find its place up on the top 10 or at least top 15.

In my next blog I would provide some working examples...
 

STAY TUNED.......................

cheers !

raheel Hussain

Published Sunday, July 22, 2007 4:22 AM by Raheel Hussain
Filed under: ,

Comments

# re: URL Rewriting (Part 1)

Sunday, July 22, 2007 5:23 AM by vikasbhat

Good information !

Would definetely be expecting Part 2 of it.

rgds.

# re: URL Rewriting (Part 1)

Sunday, July 22, 2007 3:35 PM by Meharaj

Hi,

Raheel

Thank you for your help in this matter and I look forward to receiving updated version(Part 2).

Regards,

Meharaj

Powered by Community Server (Non-Commercial Edition), by Telligent Systems