2013-01-08 45 views
0

我的WordPress的網站設置,以便任何時候您從網址中刪除WWW,它將採取回到主頁。WordPress的非主頁重定向到主頁

由於SSL的原因,我需要在沒有www的情況下訪問單個頁面。

讓我們把它叫做test.org/page

是否有一個自定義的重定向,我可以把我的htaccess的,使www.test.org/page被重定向到test.org/page?我正在使用WordPress舊版本的重定向插件和多站點。

這裏是我當前的htaccess:

RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 

# uploaded files 
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] 

# add a trailing slash to /wp-admin 
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule^- [L] 
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] 
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] 
RewriteRule . index.php [L] 

回答

0

.htaccess文件看起來不錯,我會保留原樣,但在後端檢查:

設置 - >通用

並確保您的WordPress地址(URL)和網站地址(URL)不包含包含www。

希望這有助於;)