假设你已经使用mod_jk2.so整合了Apache2.05x与Tomcat5.x

要完成的功能如下重定向:

将URL  http://host/clubClass.jsp?ccID=1  重定向为  http://host/clubClass_1.html  
 
1.  修改Apache2\conf\httpd.conf文件,加载mod_rewrite.so

程序代码:
LoadModule rewrite_module modules/mod_rewrite.so


2.  在每个虚拟主机的地方设置Rewrite参数
 
程序代码:
<VirtualHost *:80>
ServerAdmin ajie2000@gmail.com
ServerName www.javatx.cn
RewriteEngine on
RewriteRule /clubClass_([0-9]+).html /clubClass.jsp?ccID=$1 [PT]
</VirtualHost>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2021-09-28
  • 2022-01-29
  • 2021-12-25
  • 2021-05-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-05-05
相关资源
相似解决方案