2014-02-11 45 views
0

嗨,我是新的WordPress的。我改變了我的主機。但沒有CSS加載頁面(如果www.domain.com)。 否則會顯示錯誤(domain.com)。我認爲在htaccess文件中的問題。請幫我解決這個錯誤。由於wordpress url沒有得到重定向爲'www'.domain.com

這裏是htaccess文件代碼

RewriteEngine On 
RewriteCond %{HTTP_HOST} !^www\. 
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 

# uploaded files 
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule^- [L] 
RewriteRule . index.php [L] 

回答

0

在最後一行添加一個斜槓和嘗試

RewriteEngine On 
RewriteCond %{HTTP_HOST} !^www\. 
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 

# uploaded files 
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule^- [L] 
RewriteRule . /index.php [L] 
相關問題