即访问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>
可直接指向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>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货