0
我正在尝试重定向在我的Apache Web服务器上收到的URLS。基本上,当我输入用Apache重定向URL mod_rewrite
本地主机/ index.html的
我想要的网站给我重定向到一个readme.html
文件的htdocs内。 index.html
和readme.html
文件都保存在htdocs。我看了看Apache的文档,但似乎无法得到这个工作。下面我已经包含了我在httpd.conf
文件中写过的代码。
DocumentRoot "usr/local/apache2/htdocs"
<Directory "/htdocs">
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine On
RewriteBase/
RewriteRule ^index.html readme.html [PT]
</Directory>
我试过在浏览器中寻找“localhost/index.html”,但是我看到了index.html页面。除非我看错了。 感谢