httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ericdraven <>
Subject [users@httpd] How to Redirect to https after login?
Date Thu, 29 Oct 2009 10:46:57 GMT


I need some expert help on the following configuration task:

I have a startpage with a standard login form. After a user logs in, he
should be 
redirected to use https for the rest of the session.
When I use a rewrite rule as shown below,
RewriteRule ^/login(.*) https://%{SERVER_NAME}/login$1 [R,L]
the parameters get lost, because the request is translated to a GET request.
What do I need to do, to fix this problem?
Many thanx in advance

<VirtualHost *:49080>
   DocumentRoot "/xxx/htdocs/"
   DirectoryIndex index.gsp index.html
   CustomLog /weblog/httpd/access.log combined

   # Define error doc when tomcat is down
   ErrorDocument 503 /error/503.html

   # Define the proxy connection to tomcat listening on port 49888
   ProxyRequests Off
   # Define an exception for the path to apache error pages
   ProxyPass /error !
   # Route all requests to tomcat
   ProxyPass / ajp://

   # Collection of rewrite rules
   RewriteEngine On

   RewriteRule ^/login(.*) https://%{SERVER_NAME}/login$1 [R,L]

View this message in context:
Sent from the Apache HTTP Server - Users mailing list archive at

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message