Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: I'm unable to by-pass mod_auth for just one URI |
|
Author |
|
divinorum
Joined: 10 Apr 2014 Posts: 2 Location: Slovakia
|
Posted: Thu 10 Apr '14 13:07 Post subject: I'm unable to by-pass mod_auth for just one URI |
|
|
Hi, any hints are welcome
I'm trying to get exception from auth (.htpasswd ) for one specific URL, but seems, that it does not work with my Rewriting rules. Disabling RewriteEngine solving auth problem. My .htaccess:
Code: | SetEnv APPLICATION_ENV development
# Rewrite
RewriteEngine On
RewriteBase /
# ZEND
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
# Compress
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
</ifModule>
# session cookie
php_value session.hash_bits_per_character 5
# ALLOW THIS URL
SetEnvIf Request_URI "^/cart/notifikacia" notify_uri=1
# auth file
AuthUserFile /home/tomisko/.htpasswd
AuthType Basic
AuthName "Devel"
Require valid-user
# policy
Order Deny,Allow
Deny from all
Allow from env=notify_uri
Satisfy any |
Thanks.
Ivan |
|
Back to top |
|
divinorum
Joined: 10 Apr 2014 Posts: 2 Location: Slovakia
|
Posted: Thu 10 Apr '14 14:58 Post subject: Siplified version |
|
|
This version is really simple, but still does not work as expected:
Code: | SetEnv ABC 1
<RequireAny>
Require env ABC
</RequireAny> |
Code: | AH01626: authorization result of Require env ABC: denied
[Thu Apr 10 14:33:19.091773 2014] [authz_core:debug] [pid 6583] mod_authz_core.c(802): [client 127.0.0.1:49697] AH01626: authorization result of <RequireAny>: denied |
|
|
Back to top |
|
|
|
|
|
|