2017-07-06 18 views
1

我編輯了我的htaccess文件以進行https重定向。但是當我們手動編寫https://domainname.com/fashion時,它將重定向到https://domainname.com/index.php?route=fashionHtaccess手動插入的鏈接不工作

我htaccess文件看起來像

RewriteEngine On 
RewriteBase/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] 
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] 
RewriteRule ^download/(.*) /index.php?route=error/not_found [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) 
RewriteRule ^([^?]*) index.php?_route_=$1 [R=301, L] 
RewriteCond %{HTTPS} off 
RewriteCond %{HTTPS} ^www\. [NC] 
RewriteRule (.*) https://domainname.com%{REQUEST_URI} [R=301, L] 

請幫助。

回答

0

從指數規則

RewriteRule ^([^?]*) index.php?_route_=$1 [L] 

刪除R國旗和移動HTTPS重定向到頂部

RewriteEngine On 
RewriteBase/
RewriteCond %{HTTPS} off 
RewriteCond %{HTTPS} ^www\. [NC] 
RewriteRule (.*) https://domainname.com%{REQUEST_URI} [R=301, L] 
... 
+0

那樣做也。但仍然是同樣的問題。 – RKB

+0

感謝它的工作 – RKB