.htaccess - htaccess apache mod_rewrite & authentication: strange behavior -
i have created query based authentication on apache server, i've got strange behavior apache, , can't find way out of this. here .htaccess code:
rewriteengine on rewritecond %{query_string} p=1 rewriterule ^(.*)$ $1?map=$1 [e=authme:1] order deny,allow deny env=authme authtype basic authname "login required" authuserfile /var/www/test/.htpasswd require valid-user satisfy
i expect apache @ query string p=1. if found environmental variable set (authme=1). works fine!
expect authentication required (deny env=authme) if p=1 present in query string.
stuffs works wonderfully if call browser main index file (in case index.php), does not work @ all if call other file in same directory.
environmental variable correctly set (i can check php), no authentication required.
i can not understand why. appreciated!
more info can found here
do have other rewrite rules after one? have tried making last [l] rule? have tried in second browser has never authenticated on urls?
Comments
Post a Comment