m***@cdsfulfillment.com
2007-10-26 16:21:30 UTC
I have a website say www.example.com. 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 www.example.com I want it to redirect to this URL below.
https://www.example.com/webapp/wcs/stores/servlet/VerifyCustomer?storeId=100&type=Emp
So in my Vitural Host for the www.example.com:80 I have my rewrite rule set as this below.
RewriteEngine on
RewriteCond %{QUERY_STRING} promo=1225
RewriteRule /.* https://www.example.com/webapp/wcs/stores/servlet/VerifyCustomer?storeId=100&type=Emp [L]
That part works great if I type http://www.example.com.
In my Virtual Host for www.example.com:443, I don't have anything for RewriteRule, which my problem is if a user goes to https://www.example.com, 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?
https://www.example.com/webapp/wcs/stores/servlet/VerifyCustomer?storeId=100&type=Emp
So in my Vitural Host for the www.example.com:80 I have my rewrite rule set as this below.
RewriteEngine on
RewriteCond %{QUERY_STRING} promo=1225
RewriteRule /.* https://www.example.com/webapp/wcs/stores/servlet/VerifyCustomer?storeId=100&type=Emp [L]
That part works great if I type http://www.example.com.
In my Virtual Host for www.example.com:443, I don't have anything for RewriteRule, which my problem is if a user goes to https://www.example.com, 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?