Apache .htaccess
- by Peter
Hi!
I have a htaccess problem.
My directory structure look like this:
/
HEADER.html
README.html
/stackoverflow/
/stackoverflow/.htaccess
.htaccess
ServerSignature Off
Options +Indexes
HeaderName /HEADER.html
IndexIgnore HEADER.html
ReadmeName /README.html
IndexIgnore /README.html
IndexOptions +FancyIndexing
AddCharset UTF-8 .txt
IndexIgnore *.xml
IndexIgnore *.php
My primary directory is /stackoverflow/, when I navigate to this directory via browser I have included HEADER.html and README.html on every site/directories under /stackoverflow/, this works fine.
I added some php code to my HEADER.html (which is in the root directory / ), I am trying to add to htaccess:
AddType application/x-httpd-php .html .php .htm
This not working, I think because the HEADER.html is in the root.
If I try add the AddType... to the /.htaccess (and not to the /stackoverflow/.htaccess) it is overwriting my /stackoverflow/.htaccess rules. Why? How I can add AddType rule to my /stackoverflow/.htaccess to Apache parse html file as php file?