【发布时间】:2011-01-18 13:44:55
【问题描述】:
我想将所有连接从 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 存在于相应的目录指令中。
非常感谢。
【问题讨论】:
标签: apache mod-rewrite ssl mod-alias