Welcome to WebmasterWorld Guest from 54.167.46.29

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Rewrite being overridden by Deny

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

New User

joined:Mar 10, 2014
posts: 1
votes: 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