我想將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