How to redirect http to https with a non-standard port

Discussion in 'Apache' started by ebs2, Aug 24, 2011.

  1. #1
    Hi buddy,

    I am struggling with a problem for a few days,

    I would like to rewrite http://abc.com:8443 to https://abc.com:8443 through Apache.

    P.S. SSL offload has been performed in port 8443 virtual host and 8443 is a non-standard port.

    I can provide more details if anyone need it. I am grateful and thanks to your big hand.

    Best regards,
    ebs2
     
    ebs2, Aug 24, 2011 IP
  2. helpinghost

    helpinghost Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    53
    #2
    The basic rewrite rule rule would look like this:

    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://abc.com:8443%{REQUEST_URI}
     
    helpinghost, Aug 26, 2011 IP