Mod_Rewrite is literally the grand daddy of URL manipulation, it is a powerful server tool for rewriting URL’s at a server level. Mod_rewrite’s functionality is so in-depth it’s sometimes considered complicated for beginners to pick up, however like everything else in life, practice makes perfect.
Mod_rewrite not only allows web developers to rewrite their websites URL’s to something more search engine friendly but it hosts a number of useful purposes from blocking external linking to images/files on a web server right through to fixing canonicalization problems with URL’s.
Here is a simple example of how mod_rewrite returns our nice search engine friendly URL.
If a user clicks on http://www.impactwebdesign.co.uk/products/shoes/ the server will then check the .htaccess file stored within the structure of the website. After reading the rewrite rule we have specifically written the server will return with the following domain name:
http://www.impactwebdesign.com/products.php?pID=Shoes but still keep the masking of the original URL which was
http://www.impactwebdesign.com/products/shoes/ this not only makes our URL’s
Search Engine Optimised but also keeps the URL’s easy to remember.
As standard mod_rewrite comes installed with the Apache web server, however, Windows users can finally use their very own version of Helicon’s mod_rewrite software and the recent version works like a charm.
Not only is mod_rewrite a great tool for search engine optimisation it’s also great for enabling web developers to take website optimisation to greater heights.