0x1
如果前面没有放置反向代理,那么拦截uri需要在tomcat中处理
-
conf/context.xml中加入以下内容
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" asyncSupported="true"/>
-
在项目的目录内加入以下内容
webapps/sample/WEB-INF/rewrite.config
,注意先移除war包,待测试好后此文件直接写入war中RewriteCond %{REQUEST_URI} ^/sample/aaa [OR] RewriteCond %{REQUEST_URI} ^/sample/test [OR] RewriteCond %{REQUEST_URI} ^/sample/webdav RewriteRule ^(.*)$ /dashboard
评论