esport Posted August 23, 2011 Share Posted August 23, 2011 Hi Guys, I have just had an SSL certificate installed to my site. It was installed to the subdomain. I have a rewrite on the sub domain so http://orderonline.mydomain.com.au uses web servers from the same server but in another account. This rewrite work fine. RewriteCond %{SERVER_PORT} 80 RewriteRule ^orderonline/?$ /~dsoft/themes/RIV00/ However I can't seem it work with the https. The https is directed to the subfolder 'orderoline'. How do I do a rewrite for the https to point to the same directory as /~dsoft/themes/RIV00/ Thanks in advance. Daniel Quote Link to comment https://forums.phpfreaks.com/topic/245481-https-rewrite/ Share on other sites More sharing options...
gizmola Posted August 23, 2011 Share Posted August 23, 2011 Your RewriteCond is looking for Port 80. HTTPS is port 443. RewriteCond %{SERVER_PORT} 80 Quote Link to comment https://forums.phpfreaks.com/topic/245481-https-rewrite/#findComment-1261024 Share on other sites More sharing options...
esport Posted August 23, 2011 Author Share Posted August 23, 2011 Thanks heaps gizmola it works. Is it possible to have both of these rewrites working at the same time. ie. for both ports Quote Link to comment https://forums.phpfreaks.com/topic/245481-https-rewrite/#findComment-1261121 Share on other sites More sharing options...
gizmola Posted August 24, 2011 Share Posted August 24, 2011 Sure, you could have 2 different sets of rules. The RewriteCond is like a pre-check if you want to look at it that way... if it matches the following rule will be looked at, if not it will be skipped. This way you can have different rules. Also keep in mind that as far as apache is concerned, the https site is a completely different site, so it makes sense that a part 80 rule which needs to issue a 403 to move to port 443 (https) would handle things differently than a rewrite in the port 80 site, which would be more of a standard rewrite. Quote Link to comment https://forums.phpfreaks.com/topic/245481-https-rewrite/#findComment-1261568 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.