Questions about .htaccess code (2)
-
I’ve found 3 different examples of .htaccess code to restrict PHP file execution in a directory. The first example uses Order Allow, Deny to set up Deny from all. The second example uses Order deny,allow to set up Deny from all. The third example does not use the Order to set up Deny from All. Will these examples accomplish the same function – restricting PHP file execution? If not, then which examples are right or wrong? And does it matter if you use either Order allow,deny or Order deny,allow to set up Deny from all without any reference to allow, and is it necessary to use the Order to set up Deny from all?
Example (1)
# Restrict PHP File Execution
<Files *.php>
Order Allow, Deny
Deny from all
</Files>Example (2)
# Restrict PHP File Execution
<Files *.php>
Order deny,allow
Deny from all
</Files>Example (3)
# Restrict PHP File Execution
<Files *.php>
Deny from All
</Files>
- The topic ‘Questions about .htaccess code (2)’ is closed to new replies.