Forum Moderators: phranque

Message Too Old, No Replies

htaccess deny php in directory

         

chadmg

1:27 pm on Aug 3, 2006 (gmt 0)

10+ Year Member



I need help writing an htaccess file. I need to deny php from being run in a certain directory. I would also like to deny perl and cgi as well. Any help would be greatly appreciated.

Thank you.

jdMorgan

1:40 pm on Aug 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Place the directive

[url=http://httpd.apache.org/docs/1.3/mod/core.html#options]Options[/url] -ExecCGI

in a .htaccess file in that directory.

Jim

chadmg

7:01 pm on Aug 3, 2006 (gmt 0)

10+ Year Member



Thank you, but what about denying php?

jdMorgan

7:44 pm on Aug 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No script --PHP, PERL, or other-- can normally be executed if ExecCGI is disabled.

Jim