Reputation:
I have the following htaccess code in my include files directory to protect against direct access.
<Files *>
Deny from all
</Files>
This works fine except for one file which is used for my jquery star rating. Ratings are written to and read from a php file.
I need to modify the above htaccess code so ratings.data.php file is excluded from the deny all.
Something Like:
<Files *>
Deny from all
Allow ratings.data.php
</Files>
How can I accomplish this? Thank you for your help!
Upvotes: 1
Views: 1155
Reputation: 11952
The Allow/Deny directive sets the clients that can access that portion of the site. So you would need to add another section with something like:
<Files ratings.data.php>
Allow from all
</Files>
Update: Some clarification.
You need to add both sections:
<Files ratings.data.php>
Allow from all
Order Allow,Deny
</Files>
<Files *>
Deny from all
Order Deny,Allow
</Files>
Upvotes: 3
Reputation: 5812
Try something like this
<Files ratings.data.php>
Satisfy All
</Files>`
Upvotes: 0