问题描述:
apache里配置了两个location
<Location /portalweb>
WebLogicCluster ip:port
SetHandler weblogic-handler
PathTrim /
</Location>
<Location /en>
WebLogicCluster ip:port
SetHandler weblogic-handler
PathTrim /
</Location>
访问/portalweb/en/test.html时报404错误。
解决方法:
<Location /en>
WebLogicCluster ip:port
SetHandler weblogic-handler
PathTrim /
</Location>
改成
<LocationMatch ^/en>
WebLogicCluster ip:port
SetHandler weblogic-handler
PathTrim /
</LocationMatch>
就可以了。
^/en表示以/en开始的,如果不加^,只要url里有/en,apache就给拦截了。
在Apache配置中,使用<Location>指令处理/portalweb/en/test.html时出现404错误。通过将<Location /en>改为<LocationMatch ^/en>,并保持其他设置不变,解决了问题。^/en匹配以/en开头的URL,避免了不必要拦截。
1万+

被折叠的 条评论
为什么被折叠?



