January 28th, 2012, 04:50 AM
Join Date: Sep 2004
Location: Marbella, Spain
Time spent in forums: 6 Days 8 h 41 m 34 sec
Reputation Power: 0
Force html as php pages in htaccess
If somebody please can explain,
I have in my htacces telling apache to treat all html pages as php,
I just read in a hosts instructions to avoid doing that as it takes a lot of cpu resources, and my problem is cpu resources...
They say this;
AddHandler application/x-httpd-php5 .html .htm
It is highly recommended that you never allow html pages to automatically handle php or shtml, because this forces all of your html pages to be processed by the server first. Instead, please rename your files to .php or .shtml whenever possible.
I wonder if this is true, as I can do a redirect not to loose my backlinks but I dont want to change index.htm to index.php as it been that way for then years.
So what can I do?
1st, I could call all new pages .php instead of .htm,
however dont know if site looks funny having some pages with name .htm and other with .php?
2nd. I could rename all pages to .php that are not important and dont have backlinks, that way apache dont have to force html to php on all pages.
However I dont use addhandler but suppose its the same, forcing apache:
AddType application/x-httpd-php5 .htm .html
Last edited by helenp : January 28th, 2012 at 09:40 AM.