admin管理员组

文章数量:1023782

This is what I have done so far. In the settings in the admin I have updated the url to https e.g

But if i was to visit a page for example and remove https://www. from the url it would not redirect to and instead serve up the non secure link.

So i have tried adding a rewriterule in the htaccess file for example this

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

In the hope that it would capture any non-secure link and redirect it to the secure link (this is what i would normally use for non-wordpress sites)

I have also tried

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

This is a duplicated question but I have tried all the other examples but nothing has worked.

This is what I have done so far. In the settings in the admin I have updated the url to https e.g

But if i was to visit a page for example and remove https://www. from the url it would not redirect to and instead serve up the non secure link.

So i have tried adding a rewriterule in the htaccess file for example this

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

In the hope that it would capture any non-secure link and redirect it to the secure link (this is what i would normally use for non-wordpress sites)

I have also tried

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

This is a duplicated question but I have tried all the other examples but nothing has worked.

本文标签: redirectWordpress site not forcing from http to https instead getting redirected too many times