RE: [PHP] Turning off PHP for one directory with apache
| From: | Nold, Mark | Date: | Tue, 23 Jan 2001 03:17:53 +0000 |
| Subject: | RE: [PHP] Turning off PHP for one directory with apache | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-36133@lists.php.net to get a copy of this message | ||
----------------------------------------------------------------------------
-----------------
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
postmaster@normandy.com.au and delete the email document without making a
copy.
----------------------------------------------------------------------------
-----------------
After a bit of further playing it appears that simply AddType with the same
extensions that were set up should also stop php from working.
So in a .htaccess file you can just
AddType text/plain .php4 .php .inc .htm
Or in httpd.conf put something like
<LocationMatch "/test/att.*">
AddType text/plain .php4 .php .inc .htm
</LocationMatch>
That way any directory like http://myserver.com/test/attachements/ wont be
parsed by PHP.
mn
Mark Nold
markn@enspace.com <mailto:markn@enspace.com>
Senior Consultant
Change is inevitable, except from vending machines.
-----Original Message-----
From: Lewis Bergman [mailto:lbergman@abi.tconline.net]
Sent: Tuesday, January 23, 2001 10:28 AM
To: Nold, Mark
Subject: Re: [PHP] Turning off PHP for one directory with apache
> Hi guys whats the best way to turn off PHP for a directory?
>
> "php_flag engine off" in a .htaccess but doesnt work as i am using
> Apache and PHP CGI.
>
You could do it in httpd .conf with the location directive.