Welcome to WebmasterWorld Guest from 174.129.96.175

Forum Moderators: Ocean10000 & incrediBILL & phranque

Rewrite being overridden by Deny

   
4:44 am on Mar 10, 2014 (gmt 0)



Hi

I want to create rule that allows only the https request to be prompted for user credentials and the http request to be redirected .

SetEnvIfNoCase IS_SSL .*yes.* HTTPS_REQUEST
<Files *>
AuthType Basic
AuthName "MyFirstPage"
AuthBasicProvider file
AuthUserFile /indexing/.pwd
Require valid-user
Order Deny,Allow
Allow from env!=HTTPS_REQUEST
Satisfy All
</Files>


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{ENV:IS_HTTPS_REQUEST} off [NC]
RewriteCond %{THE_REQUEST} ^GET [NC]
RewriteRule ^(.*)/Mydata.php https://%{HTTP_HOST}/x1/Mydata.php [R=301,L]
</IfModule>



The above code is prompting for the password for both http and https request . Can you please suggest

I changed from All to Any for Satisfy directive and the result is that I get 301 for http request as expected but for https it does not prompt me for password

My Apache version is 2.2.22.

Regards
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month