URL Rewrite - 27th of March 2010


URL Rewrite is used to shorten or modify uniform resource locators to be more user friendly. A dynamic url such as http://brunoseo.com/entry.php?recordID=35 can be translated into http://brunoseo.com/Twitter.html making the url easier to remember and also more search engine friendly.



To use the URL Rewrite function, we have to edit the “.htaccess” file. To be able to edit it with success there has to be a apache server running with the correct url module rewrite running.



To test the mod_rewrite function on a local machine and see if it is enabled, search for a apache configuration file called “httpd.conf” in the “\Program Files\xampp\apache\conf\http.conf”. After opening the the file find the following line:



#LoadModule rewrite_module modules/mod_rewrite.so



and remove the # from the line. The # before the line means it is commented.



LoadModule rewrite_module modules/mod_rewrite.so



and after you would have to restart the Apache server.



This is what the .htaccess file for my website looks like.


Example of a .htaccess

What this produces is this


Result of a .htaccess URL rewrite



What can be seen is that if the user inputs each URL the result will be the same.



The reason for doing this is for search engine optimisation. According to SEO Pitfall a URL has some weight in SEO purposes. A good URL could help improve the rankings in the SERP's.


So I have changed all the URLs from my Journal page and even my user site map from .php pages to simple Search Engine Friendly URLs. This will hopefully if even so slightly will help increase my web page's rankings. As of today I am currently ranked 20th. I expect to see some improvements. The fact is the market I am trying to break into is extremely competitive and competent in the area of SEO. They are advertising their trade so they would have to be extremely well ranked.




Google Ranking: 20