Apache serving non-php files as php?
Date: 04/03/08
(Apache) Keywords: php, apache
My server seems to think the following is PHP and serve it as such:
http://www.perturb.org/tmp/test.php.foo.bar
However... the same file (symlinked)
http://www.perturb.org/tmp/test.php.txt
Is served as text. In fact it appears that apache servers the content as whatever the "last recognizable" extension. Shouldn't apache only server files that END in .php as php files?
The configuration is very simple:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Source: http://community.livejournal.com/apache/41268.html