SEO Mod Rewrite
In earlier articles, we have explained the importance of rewriting your URLs in order to benefit your Search Engine Optimisation (SEO). BUT BE WARNED, if your existing URLs have alot of pre-existing links going to them, then rewriting the URL will damage your ranking, as the links going to the URL which is getting rewritten will lose around 10% of their value in the rewrite. This can be very damaging in the short term, but possibly very advantageous in the long term, this has to be weighed up on a case by case basis. An example of when you should use a rewritten URL is as follows: Lets say that you ran a mobile phone site www.mobilephone.com and you had a page about a specific product, lets say a ‘HTC-Diamond’ phone. Your URL should look something like this:
www.phone.com/htc-diamond
and not the standard
www.phone.com/index.php?main_page=index&cPath=6_254#
There are a number of ways to achieve this, and alot depends on what server side language that your site uses. For the majority of e-commerce sites out there, currently PHP is the sever side language of choice, the other main one is ASP.net. The reason PHP is the most popular is all down to three reasons; firstly, it open sources no hefty price tag, secondly, PHP is much more complex in its coding but is easier to tailor than ASP and finally, its Mod Rewrite capability through use of a .htaccess file on a per-directory basis. Incorrect use of a .htaccess file can bring your site down in a flash, so be careful when doing mod rewrites and always have a backup standing by of your last good .htaccess configuration. .htaccess can easily be written in notepad and for mod rewrites, there should always be the first line “RewriteEngine on”, this turns on the rewrite capability of the .htaccess. There are a large number of things that you can do with the .htaccess file once it is turned on, there are too many to go into in this blog, but I would recommend that you search the web for .htaccess cheat sheets. To learn more on this topic, here is a good page which will get you started.
Related posts: