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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rewriterule for https and http

Status
Not open for further replies.

mmcds

MIS
Jul 5, 2007
28
US
I have a website say This is setup for port 80 and 443. The redirect/rewrite rule I use currently is for the port 80 virtual host for example.com in my httpd.conf file. When the user types I want it to redirect to this URL below.


So in my Vitural Host for the I have my rewrite rule set as this below.

RewriteEngine on
RewriteCond %{QUERY_STRING} promo=1225
RewriteRule /.* [L]

That part works great if I type
In my Virtual Host for I don't have anything for RewriteRule, which my problem is if a user goes to I will just get a blank page and shows Index of / on it. How can I get the RewriteRule to work for both port 80 and 443 correctly? I tried the same RewriteRule that I have in my port 80 Virtual Host in my 443 Virtual Host stanza in my httpd.conf file, but then it will just keep looping the URL for some reason.

So how can I get the RewriteRule to work for both port 80 and 443?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top