我想将http://www.example.com/index.htm
重定向到 本地文件:/home/admin/mf/htdocs/default.htm 如下配置httpd.conf中的apache服务器,但它不起作用,我的配置有任何问题 ?Apache http服务器重写URL失败
Listen 80
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /home/admin/mf/htdocs
RewriteEngine on
RewriteRule ^/index.htm /default.htm
</VirtualHost>
你的规则对我来说工作得很好。请参阅下面的@ nfechner的答案,了解可能的缺失配置。 – Perception