forked from ClayLanzino/lucee-docs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathurlrewrite.xml
41 lines (37 loc) · 1.24 KB
/
urlrewrite.xml
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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN" "http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">
<urlrewrite>
<rule>
<name>Add trailing slash to directories without a trailing slash</name>
<from>^(.*\/[^/\.]+)$</from>
<to type="permanent-redirect" last="true">$1/</to>
</rule>
<rule>
<note>
All request to *.html or ending in / will be rewritten to /index.cfm
</note>
<from>^(/((.*?)(\.html|/))?)$</from>
<to last="true">%{context-path}/index.cfm</to>
</rule>
<rule>
<note>
All request to *.html or ending in / will be rewritten to /index.cfm
</note>
<from>^(/((.*?)(\.md|/))?)$</from>
<to last="true">%{context-path}/index.cfm</to>
</rule>
<rule>
<note>
All assets requests to be served by the server too
</note>
<from>^/assets/.*$</from>
<to last="true">%{context-path}/index.cfm</to>
</rule>
<rule>
<note>
All image requests to be served by the server too
</note>
<from>^/images/.*$</from>
<to last="true">%{context-path}/index.cfm</to>
</rule>
</urlrewrite>