我想将所有连接从 htt_p://www.example.com/abc.html 重定向到 HTTP_S://www.example.com/abc.html 。什么 mod_alias 或 mod_rewrite 命令适用于此?我试过了:
RewriteEngine on
RewriteCond %{HTTPS} =off
RewriteRule $abc\.html^ https://www.example.com/abc.html [R]
在 .htaccess 和 httpd.conf 中,但这不起作用。如果 RewriteRule 中的第一个字符串是其他任何内容(如 abz.html),则它可以工作,但如果它是 abc.html,则不能。abc.html 是服务器上的真实文件(不是另一个重定向)。选项 FollowSymlinks 存在于相应的目录指令中。
非常感谢。