- 论坛徽章:
- 0
|
我在Window下
<VirtualHost *:8888>;
DocumentRoot "C:/Program Files/Apache Group/Apache2/tomcat"
<Location />;
Options FollowSymLinks
AllowOverride None
</Location>;
ErrorDocument 404 /index.html
</VirtualHost>;
做这个能够实现当我随意输入网址是都导向到首页。
可是同样的这个部分放到Unix上时总是不导向首页,二是出现Window自带的那个404 not found 页,请问有什么办法吗?
其实我想解决的问题很简单,就是无论输入什么网址都让它先访问首页,不知道能不能用其他方法解决呢,
我也试过
<VirtualHost *:8888>;
DocumentRoot "C:/Program Files/Apache Group/Apache2/tomcat"
<Location />;
Options FollowSymLinks
AllowOverride None
</Location>;
rewriteengine on
rewriterule ^/(.*)$ /index.html [P,L]
</VirtualHost>;
这种方式,可是页面提示:
Forbidden
You don't have permission to access / on this server.
后台日志:
[Wed Jul 13 18:02:04 2005] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://localhost:8888/index.html
这是什么原因呢,怎么解决呢? |
|