.htaccess help (not sure if configured correctly after migration)

Discussion in 'Black Hat SEO' started by xplosiv, Mar 18, 2017.

  1. xplosiv

    xplosiv Power Member

    Oct 18, 2014
    Likes Received:
    Hey guys, I just posted a few of the effects of moving to https on an established website here:

    However, I have noticed something and I'm not exactly sure if I have configured my htaccess correctly.

    The original site was in http://website.com . It is now https://website.com

    However, I do happen to have links from the www.website.com version, but there are 2 redirections to get to the https version, not just 1.


    http://www.website.com > https://www.website.com > https://website.com

    Here is my htaccess file, any help on this would be fantastic:


    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* - [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html" -f
    RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html" [L]
    # END W3TC Page Cache core

    # BEGIN rlrssslReallySimpleSSL rsssl_version[2.5.11]
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    # END rlrssslReallySimpleSSL
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress