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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.