.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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -