Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use rewrite to forward http to https?

Status
Not open for further replies.

alan123

MIS
Oct 17, 2002
149
US
I have apache-1.3.27 and mod_ssl installed on linux RH8.0
I can start regular httpd and secure https with no problem.
now I want to enforce all URL from http to https, for example on the browser, if I type URL: " then web server will take me to "How can I do that?
I also have mod_rewrite configured in apache server.
 
I do not think mod_proxy can proxy HTTPS data through and HTTP connection, so the "[P]" mod_rewrite directive will not work.

But there should be no problem setting up an "[R]" type of rewrite rule.

Something like:

RewriteEngine on
RewriteRule ^/(.+) [R,L] Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top