Apache Rewrite 如何重定向
即访问http://192.168.0.111/ex/index.jsp可直接指向http://192.168.0.111/ex/index.html
该怎么写?
我用RewriteRule ^ex/.html$ /ex/index.jsp [L]
或用RewriteRule ^(.*)\index.html$ $1http://192.168.0.111/ex/index.jsp [L]
都不行。
httpd.conf配置如下:
LoadModule rewrite_module modules/mod_rewrite.so
<Directory />
Options FollowSymLinks
AllowOverride ALL
Order deny,allow
Allow from all
</Directory>
<Directory "C:/Apache2.2/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
AllowOverride ALL
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\index.html$ $1http://192.168.0.111/ex/index.jsp [PT] #想把首页静态化,就是不成功
#RewriteRule ^(.+)$ index.html #用这语句替代上一条语句也不行
</Directory>
--------------------编程问答-------------------- 你的IP没有在同一个网段里是不能这样访问的。 --------------------编程问答--------------------
我本机,192.168.0.111是我本机IP --------------------编程问答--------------------
我本机,192.168.0.111是我本机IP --------------------编程问答-------------------- tomcat和apache、mod_jk都装在同一台电脑上 --------------------编程问答-------------------- 不知道怎么弄 --------------------编程问答-------------------- 大家帮个忙呀 --------------------编程问答-------------------- 哪位高手帮个忙 --------------------编程问答-------------------- 顶上去 --------------------编程问答-------------------- up up --------------------编程问答-------------------- up顶上去 --------------------编程问答-------------------- up顶上去 --------------------编程问答-------------------- 不懂,学习。。
补充:Java , Web 开发