Disable PHP in directory (including all sub-directories) with .htaccess

user142019 picture user142019 · Aug 13, 2009 · Viewed 126.1k times · Source

I'm making a website which allows people to upload files, html pages, etc... Now I'm having a problem. I have a directory structure like this:

-/USERS
    -/DEMO1
    -/DEMO2
    -/DEMO3
    -/etc... (every user has his own direcory here)
-index.php
-control_panel.php
-.htaccess

Now I want to disable PHP, but enable Server-side includes in the direcories and subdirectories inside /USERS

Can this be done (and how :) )? Thanks in advance.

BTW, I use WAMP server

Answer

Gumbo picture Gumbo · Aug 13, 2009

Try to disable the engine option in your .htaccess file:

php_flag engine off