Apache .htaccess

Posted by Peter on Stack Overflow See other posts from Stack Overflow or by Peter
Published on 2010-05-30T15:01:58Z Indexed on 2010/05/30 15:12 UTC
Read the original article Hit count: 353

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about apache

Related posts about .htaccess