Jump to content

rewrite over https


l0pht

Recommended Posts

Does mod_rewrite work over a https connection?  I have a site that I have configured to use http and then moved it over to https and the rewrites show up in the log file but don't show up on my webpage. I'm rewriting paths to some images and directories behind a reverse proxy.

 

I'm assuming no but I can't find anything in the documentation that confirms this.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/46914-rewrite-over-https/
Share on other sites

Hi mates

Ya , RewriteRule works in HTTPS .

 

To work with RewriteRule in HTTPS you have to check the RewriteCond as HTTPS is on or off .

lets see an example below :

 

RewriteCond     %{HTTPS} =on
RewriteRule      ^myURL$ https://mySite.com/index.php [QSA,L]

 

The above code defines that if you are ih HTTPS and you are trying to get https://mySite.com/myURL then it redirects you https://mySite.com/index.php and still showing https://mySite.com/myURL in the address bar .

 

Thanks

ShaymoL

 

Link to comment
https://forums.phpfreaks.com/topic/46914-rewrite-over-https/#findComment-232865
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.