Htaccess 手动插入的链接不起作用
Htaccess Manually inserted links not working
我已经为 https 重定向编辑了我的 htaccess 文件。但是当我们手动写https://domainname.com/fashion it is redirecting to https://domainname.com/index.php?route=fashion.
我的 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_= [R=301, L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTPS} ^www\. [NC]
RewriteRule (.*) https://domainname.com%{REQUEST_URI} [R=301, L]
请帮忙。
从索引规则中删除 R
标志
RewriteRule ^([^?]*) index.php?_route_= [L]
并将 https 重定向移至顶部
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteCond %{HTTPS} ^www\. [NC]
RewriteRule (.*) https://domainname.com%{REQUEST_URI} [R=301, L]
...
我已经为 https 重定向编辑了我的 htaccess 文件。但是当我们手动写https://domainname.com/fashion it is redirecting to https://domainname.com/index.php?route=fashion.
我的 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_= [R=301, L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTPS} ^www\. [NC]
RewriteRule (.*) https://domainname.com%{REQUEST_URI} [R=301, L]
请帮忙。
从索引规则中删除 R
标志
RewriteRule ^([^?]*) index.php?_route_= [L]
并将 https 重定向移至顶部
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteCond %{HTTPS} ^www\. [NC]
RewriteRule (.*) https://domainname.com%{REQUEST_URI} [R=301, L]
...