gpt4 book ai didi

apache - 避免 JKMount,使用 mod_rewrite 而不是 mod_jk

转载 作者:行者123 更新时间:2023-11-28 23:34:12 25 4
gpt4 key购买 nike

通常这是启用 mod_jk 模块的方式,并且这不仅仅对一个 session (一个网页)或应用程序等启用。

<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>

最佳答案

我的印象是 jkmount 完全没有考虑 mod_rewrite 操作,所以我转而使用 Location 和“SetHandler jakarta-servlet”。也许你可以有一个 Location 来逃避 Tomcat,然后是一个 ""?

关于apache - 避免 JKMount,使用 mod_rewrite 而不是 mod_jk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26367529/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com