https 301 redirect htaccess
-
I want http 301 redirect to https, I had tried many codes but that is only 302 Moved Temporarily. Currently i’m using this plugin https://wordpress.org/plugins/force-ssl/ but it not redirecting direct to path, this plugin work like example.com 302 Moved Temporarily > to https://example.com/ 301 Moved Permanently > to https://www.example.com/ HTTP/1.1 200 OK,
Code used by me:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] </IfModule>
Force HTTPS RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
I want 301 Moved Permanently from any version to https://www.example.com, this settings already done » General and updating WordPress and site URL address fields with https.
Thank you.
- The topic ‘https 301 redirect htaccess’ is closed to new replies.