Monday, March 19, 2012

convert the php extension to html using url rewriting

Making a user friendly url is now a day quite popular that is why every site use url rewriting technique to make the url seo friendly.I am adding a htaccess rewriting rule which will do convert the .php extension to .html.

RewriteCond %{THE_REQUEST} ^.*/Pagename.php
RewriteRule ^Pagename.php /Pagename.html [R=301,L]
RewriteRule  ^Pagename.html Pagename.php

No comments :

Post a Comment