簡體   English   中英

Htaccess手動插入的鏈接不起作用

[英]Htaccess Manually inserted links not working

我已經編輯了htaccess文件以進行https重定向。 但是,當我們手動編寫https://domainname.com/fashion時,它是否重定向到https://domainname.com/index.php? 路線 =時尚

我的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]

請幫忙。

從索引規則中刪除R標志

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

並將https重定向移到頂部

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM