我正在使用以下 mod 重写来确保不仅规范 URL,而且该站点使用 HTTPS 显示:
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
// It think the problem must be here --^
RewriteCond %{HTTP_HOST} ^rto12\.ca$ [NC]
RewriteRule ^(.*)$ https://www.rto12.ca/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php?
RewriteRule ^index\.php?$ https://www.rto12.ca/ [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html?
RewriteRule ^index\.html?$ https://www.rto12.ca/ [R=301,L]
当您尝试去这里时,我的问题就来了:rto12.ca
...浏览器将您带到这里:` https://www.rto12.ca/https://rto12.ca/ '
这是导致这种情况的第一个条件/规则。任何建议,将不胜感激。