Users appreciate clean URL’s and search engines will rank your site higher if you have easily understandable filenames.
Rewriting URL’s is one of the skills that separates average webmasters from ninja webmasters. You know, the guys who work on cutting edge web 2.0 projects and utilize viral traffic from social websites. Rewriting a site page structure is the key that will open your content to the masses.
When creating filenames I prefer hyphens to underscores, and I like to separate content into logical folders.
In the example above, we removed the query string and meaningless numbers, replacing them with real values that instantly gives a user feedback to what they will find on the page. Cat=42 means nothing to anyone except the programmer, but car/honda/accord lets a user know what they will see before opening the page.
Here is a simple tool from LinkVendor to help you rewrite pages to make better websites. Just enter your current filename and this script generates your .htaccess file for you! Once you’re done, upload this new .htaccess file to the root folder of your webserver and you now have search engine friendly URL’s.
take this ugly URL: http://www.myspace.com/index.cfm?fuseaction=blog&friendid=6221
and make this: http://www.myspace.com/blog/friendid/6221/
here is the code:
RewriteRule /(.*)/friendid/(.*)/ index.cfm?fuseaction=$1&friendid=$2
This requires you use an apache server with mod_rewrite enabled. It is perfect on the LAMP platform, Linux/Apache/MySql/PHP. Do yourself a favor and checkout LinkVendor to help you make search friendly websites & Andy Beard’s resource on .htaccess for wordpress.