I don't want to get rid of the .html file extensions and lose the page rank. I do need to use php includes because sites just seem to keep growing. So far I've tried quite a few ways that haven't worked, and I'll list them here. Some of these were ways that worked for other people in this branch of the wafo. These were the .htaccess statements I tired one at a time, separated by line breaks. Each blank line is a different try.
Trying to get php includes to work in an html page
9
I don't want to get rid of the .html file extensions and lose the page rank. I do need to use php includes because sites just seem to keep growing. So far I've tried quite a few ways that haven't worked, and I'll list them here. Some of these were ways that worked for other people in this branch of the wafo.
These were the .htaccess statements I tired one at a time, separated by line breaks. Each blank line is a different try.
Each of these would not load the page, but I would get a little download type of pop up saying approximately:
The default selection is 'open with firefox.exe'
One bit of code that did work, but in the wrong way was:
This required changing the file extensions to .php (exactly what I don't want to do) and it left .html in the browser address bar. I also don't want to do that.
Anything else I can try?
baffled (of course that feels like normal to me now)
../lloyd
These were the .htaccess statements I tired one at a time, separated by line breaks. Each blank line is a different try.
Code:
AddType application/x-httpd-php .htm .html AddHandler application/x-httpd-php5 .html .htm RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html <FilesMatch ".(htm|html|php)$"> SetHandler application/x-httpd-php </FilesMatch>
The default selection is 'open with firefox.exe'
One bit of code that did work, but in the wrong way was:
Code:
RewriteEngine on RewriteBase / RewriteRule ^([^.]+).html$ $1.php [L]
Anything else I can try?
baffled (of course that feels like normal to me now)
../lloyd
- aesoft
- [1] reply
- Lloyd Buchinski
- [2] replies
Next Topics on Trending Feed
-
9