RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
AlecS wrote:How do configure XAMPP to run php script in files with a .html extension?
AlecS wrote:My old computer works with an older XAMPP package which handles running php scripts in HTML files
AlecS wrote:I've tried a .htaccess file in the root. but that didn't work.
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php .html
This line of code 'AddType application/x-httpd-php .php .html' is in the httpd.conf file.
How do configure XAMPP to run php script in files with a .html extension?
cthackers wrote:I think AlecS was trying to ask about .html seo optimized links. Requests with .html extensions sent to php files because of ModReqrite rules. That makes more sense than embedding php in html static files and making htmls beeing parsed by php interpreter.
Altrea wrote:Other way round:
If your files contain php code, why don't you give them the php file extension?
This is the right way to do this!
It's absolutely okay, to outsource code parts like a navigation menu. But to route all htm files through the php interpreter is not the clean way.
Mobius wrote:99% of the HTML files have the "outsource code" to the "navigation menu".
HEREDOC is a nice way for some string situations. For Navigations, i don't know.Mobius wrote:*_I_* understand that it could all be done in PHP, (I think the >>>HEREDOCS is what you are getting at?)
Mobius wrote:however, my user only has MS Frontpage. I don't. So, can Frontpage handle PHP files?
Users browsing this forum: No registered users and 73 guests