logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Https redirection by mod_rewrite before mod_auth_digest
Author
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Mon 12 May '08 13:28    Post subject: Https redirection by mod_rewrite before mod_auth_digest Reply with quote

Hi
I would like to force one of Apache's (2.2.8 with OpenSSL 0.9.8g) alias only https connection and with mod_auth_digest authorization.

I have created .htaccess file and put it on alias directory :

RewriteEngine On
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://%{HTTP_HOST}/support_center/$1 [L,R]
AuthType Digest
AuthName "support"
AuthUserFile "path_to_apache_directory/passwd/digest"
require valid-user

But when clients use http connection they are asked about login/password and after this they are forwarded to https connection and asked about login/password one more time.
How to avoid this situation ? I would like to force client to switch http to https automaticly and after establishing https connection, request to log in based on mod_auth_digest.

Any advise would be appreciate.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 13 May '08 9:29    Post subject: Reply with quote

Why not rewrite the root directory and ask for the password in the /support_center folder?
Maybe you make a link or a PHP redirect in the folder to support_center.
Back to top


Reply to topic   Topic: Https redirection by mod_rewrite before mod_auth_digest View previous topic :: View next topic
Post new topic   Forum Index -> Apache