2016-04-19 155 views
2

我想我https://fastassignmenthelp.co.uk/https://www.fastassignmenthelp.co.uk/轉換HTTPS非WWW域名到https WWW

HTTPS非WWW ---> HTTPS WWW

這裏是我的wordpress htaccess的代碼.....

轉換
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://fastassignmenthelp.co.uk//$1 [R,L] 

# 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 
+1

你真的尋找如何做到這一點?它從字面上需要5秒 - https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=forward%20non%20www%20to%20www –

回答

0

要轉換

您可以使用以下規則:

RewriteEngine on 
RewriteCond %{HTTPS} on 
RewriteCond %{HTTP_HOST} !^www\. 
RewriteRule^https://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R] 

只要改變[RR = 301當您確定規則工作正常。

相關問題