htaccess在RewriteRule结尾的斜杠

时间:2019-05-20 09:46:10

标签: .htaccess url-rewriting

我的htaccess中有此规则

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]

它可以正常工作,将每个URL都重写为“ https://www.example.com”,但是我想将“ https://www.example.com/”末尾的斜杠重定向到该URL。我应该更改什么? >

0 个答案:

没有答案