Redirecting HTTPS From Old To New Domain

Discussion in 'Apache' started by Bedwan, Oct 26, 2011.

  1. #1
    How can I redirect all sites pages from an old domain name to a new domain name using 301 code.

    I have used the following code:
    Using this code I could redirect the old domain pages to the new domain pages except that it is not working with HTTPS pages.

    So, how can I redirect the HTTPS pages from the old domain to the HTTPS of the new domain?
     
    Bedwan, Oct 26, 2011 IP
  2. Sorror

    Sorror Active Member

    Messages:
    376
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #2
    SSL requests go through different port than http. If it's set e.g. to 443, just use

    RewriteCond %{SERVER_PORT} !443
    Code (markup):
    and then redirect requested path to the new https url.
     
    Sorror, Oct 27, 2011 IP