1

I have switched from http to https, but now I am getting duplicate content. My .htaccess is:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

# BEGIN WordPress
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

I want to redirect homepage and all page/post to https. I have tried all methods, but no luck.

The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

No one worked.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.rancahpost.com/$1 [R,L]

This:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

This:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L] 

This

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.rancahpost.com/$1 [R=301,L]

This:

RewriteCond %{HTTPS} on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}/$1 [R=301,L]

This:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

This:

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

This:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

How can I redirect all http traffic to https?

jamesmortensen
  • 33,636
  • 11
  • 99
  • 120
marvic
  • 11
  • 1
  • 1
    possible duplicate of [Redirect HTTP to HTTPS on default virtual host without ServerName](http://stackoverflow.com/questions/11621053/redirect-http-to-https-on-default-virtual-host-without-servername) – jww Aug 24 '14 at 23:52

0 Answers0