• 0

Apache not parsing php in html file


Question

I'm running xampp on Windows 7.

I've set my .htaccess file to get Apache to parse php in my html files. But it doesn't. There's nothing wrong with my files since everything works fine on my webhost.

Apache parses the php just fine if the file extensions are changed to php.

I've changed the configuration in apache\conf\httpd.conf appropriately to 'AllowOverride All'. And I've restarted Apache a couple of times times. But no go.

I'm sure this is not relevant but I use an NTFS junction to map my website's folder into htdocs.

So is there something I am overlooking?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I don't think the 'AllowOverride All' does what you're wanting it to do.

Try adding/updating the line:

AddType application/x-httpd-php .html .php .htm

in your httpd.conf or .htaccess

AllowOverride just sets how much .htaccess files are allowed to override the default config for that directory IIRC.

Link to comment
Share on other sites

  • 0

It was a problem with my .htaccess. I was using addhandler instead of addtype but it seemed to be working fine on my webhost. I did try the addtype along with the addhandler but apparently addhandler was causing problems on localhost.

Thanks! Seems like a trivial problem now.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.