htaccess Elite

Hire htaccesselite professional

.htaccess tutorial


All times are UTC - 5 hours





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Order, Allow, Deny
PostPosted: Oct 20th, '06, 20:53 
User avatar

Joined: Sep 24th, '06, 22:48
Posts: 240
Authorization
Authorization is the process of verifying if a user, once identified by the authentication mechanism, is permitted to access the requested resource. The access is usually determined by verifying if the user is coming from a certain location or has a specific client environment characteristic.

Order
The order directive is a bit tricky to new Apache users, as it controls two seemingly unrelated issues:

Controls the order in which the Allow and Deny directives are processed.

Sets a default policy for connections that do not match either of the Allow or Deny rules.

There are only two options available to the order directive, discussed next.

Code:
Order deny, allow

This order creates the following rule set; the deny rules are processed before the allow rules. If the client does not match the deny rule or they do match the allow rule, then they will be granted access.

Code:
Order allow, deny

This is the opposite configuration in that the allow rules are processed before the deny rules. If the client does not match the allow rule or they do match the deny rule, then they will be denied access.

Let's show a few examples with the most basic of allow and deny rule qualifiers, the "All" parameter. Take a look at the following two example configurations:

Example 1Client would be denied.

Code:
<Directory "/usr/local/apache/htdocs">
Order allow,deny
Deny from all
Allow from all
</Directory>


Example 2Client would be allowed.

Code:
<Directory "/usr/local/apache/htdocs">
Order deny,allow
Deny from all
Allow from all
</Directory>


As these examples illustrate, unintended access may be allowed or denied if the incorrect directive arguments order is applied. It is therefore extremely important to fully test all configurations to validate that the proper access control is attained.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB