urlrewrite.xml
2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
"http://www.tuckey.org/res/dtds/urlrewrite3.0.dtd">
<urlrewrite default-match-type="wildcard">
<rule match-type="regex">
<from>^/admin/user/(.*)\$</from>
<to type="forward">/app/admin/userform?id=$1&from=list</to>
</rule>
<!-- The following fixes a CSS bug in CXF. -->
<rule match-type="regex">
<from>^/services//(.*)$</from>
<to type="forward">/services/$1</to>
</rule>
<!-- Add rules here for anything that shouldn't be served up by Spring MVC. -->
<rule>
<from>/</from>
<to type="redirect" last="true">%{context-path}/storage/chart.html</to>
</rule>
<rule>
<from>/app/**</from>
<to last="true" type="redirect">%{context-path}/$1</to>
</rule>
<rule>
<from>/j_security_check</from>
<to>/j_security_check</to>
</rule>
<rule>
<from>/dataAccessFailure</from>
<to>/dataAccessFailure</to>
</rule>
<rule>
<from>/dwr/**</from>
<to>/dwr/$1</to>
</rule>
<rule>
<from>/services/**</from>
<to>/services/$1</to>
</rule>
<rule>
<from>/common/**</from>
<to>/common/$1</to>
</rule>
<rule>
<from>/assets/**</from>
<to>/assets/$1</to>
</rule>
<rule>
<from>/images/**</from>
<to>/images/$1</to>
</rule>
<rule>
<from>/scripts/**</from>
<to>/scripts/$1</to>
</rule>
<rule>
<from>/styles/**</from>
<to>/styles/$1</to>
</rule>
<rule>
<from>/webjars/**</from>
<to>/webjars/$1</to>
</rule>
<rule>
<from>/crossdomain.xml</from>
<to>/crossdomain.xml</to>
</rule>
<rule>
<from>/favicon.ico</from>
<to>/favicon.ico</to>
</rule>
<rule>
<from>/login*</from>
<to>/login.jsp</to>
</rule>
<rule>
<from>/logout*</from>
<to>/logout.jsp</to>
</rule>
<!-- Spring MVC -->
<rule>
<from>/**</from>
<to>/app/$1</to>
</rule>
<outbound-rule>
<from>/app/**</from>
<to>/$1</to>
</outbound-rule>
<!-- Remove JSESSIONID from URLs when cookies disabled -->
<!-- http://stackoverflow.com/questions/962729/is-it-possible-to-disable-jsessionid-in-tomcat-servlet -->
<outbound-rule encodefirst="true" match-type="regex">
<name>Strip URL Session ID's</name>
<from>^(.*?)(?:\;jsessionid=[^\?#]*)?(\?[^#]*)?(#.*)?$</from>
<to>$1$2$3</to>
</outbound-rule>
</urlrewrite>