免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2044 | 回复: 0
打印 上一主题 下一主题

[Web] Apache + Tomcat + mod_rewrite! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-17 10:01 |只看该作者 |倒序浏览
我现在要配置一个公司内容用的服务,,Apache+Tomcat,模块主要使用mod_rewrite + mod_jk,
工程在是在Tomcat/webapp下,工程名字是 /nbbs

在地址栏里面如果用户输入 /login,这样子的URL,我会通过Rewrite 重写为 /nbbs/login,然后通过mod_jk连接到Tomcat,现在这些都没有问题。画面可以正常显示。问题估计是出在Cookie上,
因为Tomcat是把JsessionId写到了/nbbs 这个path下,而我每次访问的路径是不带/nbbs这样子的前缀的,
不知道该怎么解决,各位帮帮忙?
下面是我的RewriteRule,各位给看一下。

RewriteEngine On
   RewriteRule ^(/image/.*)$ $1 [L]
   RewriteRule ^(/css/.*)$ $1 [L]
   RewriteRule ^(/rte/.*)$ $1 [L]
   RewriteRule ^(/script/.*)$ $1 [L]
   RewriteRule ^(/favicon.ico)$ $1 [L]

   # Access the nbbs context directly.
   RewriteRule ^(/nbbs/.*)$ $1 [L]

   RewriteRule ^/$ /nbbs/index [PT]
   RewriteRule ^/(index)$ /nbbs/index [PT]
    RewriteRule ^/(thread|user|download|admin|threads|recommends|search|error|tag)(.*)$ /nbbs/$1$2   [PT]
    # AJAX URIs:
    RewriteRule ^/(ajax/.*)$ /nbbs/$1 [PT]
    CustomLog logs/mod_jk_log common
    JkLogLevel debug
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    JkWorkersFile conf/workers.properties
    JkMountFile conf/uriworkermap.properties
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP