2017-09-23 57 views
0

有問題的網站是https://thefriendlygearpage.com的.htaccess不是重定向的所有頁面,以非www的

如果您訪問的是,你會看到它工作正常。

現在去https://www.thefriendlygearpage.com

它不工作,如果你看一下地址欄,它丟棄從年底.COM。

不去https://www.thefriendlygearpage.com/forums/forum-issues-reporting.230/

該網頁只是罰款,並重定向到頁面的非www的,因爲它應該。

附近,我可以告訴,除了主頁,網站中的每個頁面都可以正常工作。如果您轉到該網站的www版本,它應該將您重定向到非www版本,這很簡單。

這裏是我的.htaccess文件,只是在幫助它。我在這裏難住!

# Mod_security can interfere with uploading of content such as attachments. If you 
# cannot attach files, remove the "#" from the lines below. 
#<IfModule mod_security.c> 
# SecFilterEngine Off 
# SecFilterScanPOST Off 
#</IfModule> 

ErrorDocument 401 default 
ErrorDocument 403 default 
ErrorDocument 404 default 
ErrorDocument 405 default 
ErrorDocument 406 default 
ErrorDocument 500 default 
ErrorDocument 501 default 
ErrorDocument 503 default 

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^www\.thefriendlygearpage\.com [NC] 
RewriteRule ^(.*)$ https://thefriendlygearpage.com/$1 [L,R=301] 

RewriteEngine On 

# If you are having problems with the rewrite rules, remove the "#" from the 
# line that begins "RewriteBase" below. You will also have to change the path 
# of the rewrite to reflect the path to your XenForo installation. 
#RewriteBase /xenforo 

# This line may be needed to enable WebDAV editing with PHP as a CGI. 
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L] 
RewriteRule ^.*$ index.php [NC,L] 
</IfModule> 

回答

0

哇......愚蠢的我。它只不過是一個緩存的瀏覽器錯誤。我清除了我的瀏覽器緩存,現在它工作正常。

相關問題