httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Moe <ji...@sohnen-moe.com>
Subject [users@httpd] RewriteRule help
Date Sat, 23 Jul 2011 19:07:24 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
  This rule works, mostly. It is in the .htaccess file of the DocumentRoot.

RewriteEngine On
RewriteCond %{REQUEST_URI} =/teachers/ [OR]
RewriteCond %{REQUEST_URI} =/gated-bm/
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R]

  Where it fails is the </gated-bm/> page. That directory also has a
.htaccess file which requires a username/password to view the page.
  What happens is that the authorization is triggered first before the
redirection to https. After entering the user/pass, the redirection
occurs and another authorization request pops up.

  How do I get the redirection to occur before the non-secure
authorization request?

- -- 
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4rG+wACgkQzTcr8Prq0ZMnOQCdGkvyhWeHnKgVRa+IOYhxMSJz
dvsAn0ToSTHifGNOpXUuVAcQMa0jWQpV
=8xiV
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message