When you spend time looking for goods or services using search engines you may find that the majority of the top results have static URLs (web addresses) such as:

Example 1
http://www.website.com/mobilephones/samsung/d900/

If you run a website that uses dynamic database driven pages you may notice that your URLs look like:

Example 2
http://www.website.com/index.php?cat=4&subcat=2&prod_id=15

Notice the question mark and the illogical information afterwards?

To the web server this makes sense and works the same as the static example posted above it but when looking at search engine results you may notice that dynamic URLs don't rank so highly. There are exceptions but it's generally the rule. Search for a product and you'll see for yourself.

So, the question is, how do you get your website to have friendly URLs?

Well the answer is mod_rewrite. This is a particular feature of your websites host and you'll need to contact them to check they support it. Most Linux hosting services do but don't worry if your website host is Windows, this very forum is hosted on a Windows server and we use mod_rewrite. Again, email your host and ask for compatibility.

Mod_rewrite is quite technical and you may need your websites developer to implement but it's a small investment which is worth it when considering the benefits.

- Easier website addresses to remember.
- Better for printing on business cards or ads.
- Better search engine performance.

Mod_rewrite is a plain text file. The file name is:

.htaccess

Typically, the code within the .htaccess file would look like:

Options +FollowSymLinks
RewriteEngine on
RewriteRule index/(.*)/(.*)/(.*)/$ /index.php?cat=$1&subcat=$2&prod_id=$3

Rather than explain how it works, rest assured it does. The above code will turn example 2 into example 1 which is more readable, more memorable and more search engine friendly.

Try it out.

A great resource for generating a mod_rewrite command for your website is:
- http://www.webmaster-toolkit.com/...rewriterule-generator.shtml