.htaccess ForceType directive os x apache

larry98765

Registered
Hi All,

I'm trying to use .htaccess to force a file (named, for example, "foo" intentionally with no suffix) to be parsed as PHP.

This:

<Files foo>
ForceType application/x-httpd-php
</Files>

usually does the trick but doesn't seem to work on OS X apache (Tiger).

The php renders unparsed. (Yes, PHP is working fine on .php pages.)

Any ideas? Thanks in advance.
 
Did you change the httpd.conf file to allow htaccess files?
Edit /etc/httpd/httpd.conf and change

AllowOverride None

to anything that matches your needs. AllowOverride All would be okay for testing and internal servers.
 
Back
Top