It should be easy one but I am still not comfortable with 301 redirector. I have website with flat html pages. I would like to convert those HTML pages to PHP pages. I will have the same file name but only the php page extension. How can I do a 301 redirect that will redirect pages from html to php pages? I want to redirect: pages.html -------> pages.php I have around 100+ HTML pages. Thanks,
I think you can do this in your .htaccess file (requires mod_rewrite): RewriteEngine on RewriteRule ^(.*)\.html$ http://full_domain/$1.php [R=301]I think you might be better to keep the redirection internal, which cuts out a whole lot of HTTP requests and is faster for the user: RewriteRule ^(.*)\.html$ $1.phpThis way, the users will still be accessing the .html files, but the webserver will actually be serving the output from the .php files to them. As far as they are concerned, your website has not changed. Obviously you don't need to change your internal links either. Cheers, Cryo.
I have a utility that may help you out if you're web sites are running on Windows. The product is called siteDirector .NET. It has a free evaluation so you can explore it prior to purchase. I also invite any feedback for improvement, feature requests, etc. You can learn more about this product here at URL: http sitedirector.nc-software.com Hopefully this can help you out.