My tomcat process has -DcontextName=companyApp but I am unable to use this in my urlrewrite.xml file
<?xml version="1.0" encoding="utf-8"?>
<!--
Configuration file for UrlRewriteFilter
/
-->
<urlrewrite use-query-string="true" default-match-type="wildcard">
<rule>
<from>${contextName}</from>
<to type="permanent-redirect" last="true">abc</to>
</rule>
</urlrewrite>
the redirect does not work. I think the ${contextName} is not getting resolved.
Note that I have set default-match-type="wildcard"
to remove any doubts about any clash with regex engine.
Edit: I also tried to use %{context-path}, which is a variable provided by url rewrite filter, to do the same job but that did not work either, which is why I am using this approach.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744909688a4600472.html
评论列表(0条)