Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi,

    I am facing the same issue. I wanted all forms of url variations enforced to https+non-www version of the url. But this seemed to work ONLY for the home page and NOT on the inner pages of the website. Whenever I typed just the domainname/inner-page, it opened the http version of the page.

    After lots of research, I found a way that seems to work.

    The following steps worked for me:
    1) Disable/uncheck the “cache” option from WP Fastest Cache settings page.

    2) In the htaccess file, immediately after the foll. 2 lines:
    <IfModule mod_rewrite.c>
    RewriteEngine On

    add this code:
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    So the final thing looks like this:

    </IfModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    That’s it. It works for me. I type in the url without any http or https or www and it opens up the https-non-www version of the url which is what I want.

    As of writing this comment I tried modifying the code with the Cache setting enabled and it was working fine as well.

    To WP Fastest Cache – Is this approach safe i.e. it will not hamper the caching settings applied for my website? Pls confirm.

    Thank You.
    Amar Negi.
    P.S. the suggestion in this post (to change the order of rules) helped a lot – https://stackoverflow.com/questions/19168489/https-force-redirect-not-working-in-wordpress/19168616#19168616

Viewing 1 replies (of 1 total)