Forum Moderators: phranque

Message Too Old, No Replies

Parse only specific files for PHP

         

bigjoe4

5:26 pm on Aug 4, 2008 (gmt 0)

10+ Year Member



Is there a way to use .htaccess file to specify which urls are parsed for PHP? e.g.

example.php would be parsed for php and widget.php wouldn't?

Thanks.

jdMorgan

7:18 pm on Aug 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See Apache mod_include [httpd.apache.org], and the XBitHack directive. Disclaimer: I know it works for SSI, but I have not tried it to control PHP parsing.

You could also try enclosing your mod_mime AddHandler and/or AddType directives in <Files> or <FilesMatch> containers -- See Apache core doc. Be careful: <Files> and <FilesMatch> mean filenames, not URLs, and do not take directory paths into account, only the filename.

Jim