954,176 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP interpret all extensions

Hey,
Is there a way to get Apache to interpret all files with MIME types that are not already defined to PHP?
I've tried
AddType application/x-httpd-php *
Any other ideas?
Tnx,
Sam Rudge

samarudge
Posting Whiz
359 posts since May 2008
Reputation Points: 26
Solved Threads: 31
 

Hey.

You can try something like:

<FilesMatch ".*(?<!gif|png|jpeg|jpg|js|css|xml)$">
	SetHandler application/x-httpd-php
</FilesMatch>

The extensions list in the regexp are those who shouldnot be interpreted as PHP.

Atli
Posting Pro
540 posts since May 2007
Reputation Points: 93
Solved Threads: 70
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You