【发布时间】:2014-10-14 18:14:38
【问题描述】:
通常这是启用mod_jk模块的方式,并且不是只对一个会话(一个网页)或应用程序等启用。
<VirtualHost *:*>
#Enable for servlets anywhere
JkMount /* ajp13
</VirtualHost>
对于一个特定的 URL,我想先使用 mod_rewrite 模块(不禁用 JkMount)... 怎么样?
//I need to execute this first or avoid JKMount only this moment!!!
<IfModule mod_rewrite.c>
RewriteEngine On
// no matter what the code does
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}FileOne.jsp -f
RewriteCond %{REQUEST_FILENAME} -d
#Change URL like new URL Request
RewriteRule ^ %{REQUEST_URI}FileOne.jsp [L,P]
</IfModule>
【问题讨论】:
标签: apache .htaccess tomcat mod-rewrite mod-jk