Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: http to https

Discussion in 'Misc WordPress Requests' started by WordPress.org Forums », Mar 29, 2018.

  1. WordPress.org Forums »

    Guest

    Reply To: http to https, by

    Below is the contents of the file. I did not copy all of the individual 301 redirects and left one as a sample. Because the site is still new, there are still pages showing up in the Search Console that need to be redirected to the new pages. I have tried entering the redirects and pointing to the https version, but all this does is cause a loop and the browser throws back an error on too many redirects. So, I then tried redirecting the pages to the http version, but I still get the redirect error in the browsers. It seems I can’t do anymore redirecting at all for any of the pages showing up in the search console. Not sure how to let google know that the pages have moved to a new URL anymore.

    **I do have 4 versions of this site set up in the console and set the preferred domain. I am also using Jetpack and Cloudflare.

    Header set Strict-Transport-Security “max-age=31536000” env=HTTPS

    #Redirect all traffic to https
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    #End redirect all traffic to https

    # BEGIN YOAST REDIRECTS
    <IfModule mod_rewrite.c>
    RewriteEngine On
    Redirect 301 “/shop/cuckoo-clocks/souvenir-cuckoo-clock-battery-operated” “/shop/cuckoo-clocks/souvenir-cuckoo-clock-wind-up”
    </IfModule>
    # END YOAST REDIRECTS

    # Yoast SEO – XML Sitemap Rewrite Fix
    RewriteEngine On
    RewriteBase /
    RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
    RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
    RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
    RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
    # END Yoast SEO – XML Sitemap Rewrite Fix

    # 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]
    </IfModule>

    # END WordPress

    ## EXPIRES HEADER CACHING ##
    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType application/javascript “access 1 month”
    ExpiresByType application/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 2 days”
    ## EXPIRES HEADER CACHING ##

    Options +FollowSymLinks

    # redirect from old site as of 2-4-18
    redirect 301 /html/newsletters.html http://www.deutscheshaus.cc/articles/

    Reply To: http to https
     
    #1

Share This Page

Monarch Social Sharing Plugin