Page 1 of 1

PHP disable on file wise

Posted: Tue Sep 22, 2009 7:30 am
by asela_05085
hi all,

with your help i was able to disable PHP on my web server on folder wise (i.e disable PHP for specific folder)
now my company has given me a new challenge to disable PHP on file wise.
i.e : I want only to execute some PHP files with specific names and not to execute any other PHP files with different names (e.g : only to run index.php and any other PHP file will not run/no matter where is the location of the file)

pls somebody advice me on this

Re: PHP disable on file wise

Posted: Tue Sep 22, 2009 7:49 am
by Eric!
What do you want to happen when some user tries to run one of these php files that is not supposed to be parsed? Are you using Apache?

If you want to redirect them you can change the .htaccess with redirect permanent.

If you want people to see these files as text you can change the .htaccess with addtype http://httpd.apache.org/docs/1.3/mod/mo ... ml#addtype