• Resolved user125

    (@user125)


    I am having a similar problem and this addition to the .htaccess file has not resolved it.

    The difference may be that I am using the Really Simple SSL plugin which already has similar code in the .htaccess file (see code below). I need both plugins to work together.

    My problem:
    When a browser goes to http://www.domainA.com it is redirected to https://www.domainA.com
    When a browser goes to http://www.domainB.com it is redirected to https://www/domainB.com

    However, when I have set up a redirect on the Multiple Domain Mapping on a Single Site plugin that redirects a specific URL on domainB to a page on domainA, this only works if the browser requests the HTTPS version of the page. When the HTTP version is requested then it returns file not found.

    Example:
    Multiple Domain Mapping on a Single Site maps:
    domainB.com/product –> domainA.com/content/page1

    https://domainB.com/product displays correctly
    http://domainB.com/product redirects to https://domainB.com/content/page1 and gives a 404 message

    Really Simple SSL .htaccess code:

    # BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.9]
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>
    # END rlrssslReallySimpleSSL
    # BEGIN Really_Simple_SSL_SECURITY_HEADERS
    <IfModule mod_headers.c>
    Header always set X-XSS-Protection “1; mode=block”
    Header always set X-Content-Type-Options “nosniff”
    Header always set Referrer-Policy: “no-referrer-when-downgrade”
    </IfModule>
    # END Really_Simple_SSL_SECURITY_HEADERS

    Your help would be much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    that behaviour you describe is triggered by the first rewriterule from that reallysimplessl-code. if this is all that plugin is used for, i’d recommend to build your individual htaccess code and drop that plugin.

    Thread Starter user125

    (@user125)

    Thanks for the quick response and for a very useful plugin.

    I should have mentioned that I tried replacing the Really Simple SSL code with the htaccess code in your response to this issue: https://ww.wp.xz.cn/support/topic/ssl-issues-15/

    However, I found that I continued to have the same problem, so I take it that this is expected behaviour.

    I don’t know enough to write my own code unfortunately. So I’ve worked around it by using URLs that go one layer down (i.e. after the first /) as the reference pages for the redirects. Not perfect, but it does seem to be working.

    Plugin Author matthias.wagner

    (@matthiaswagner)

    thanks 🙂 glad to hear you found a solution. please keep in mind that you always have to completely disable your browser cache and flush it before testing, since such redirects tend to stay in the browsers memory for some time 🙂

    matt

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HTTP/HTTPS redirect issues’ is closed to new replies.