-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexample.web.config
83 lines (82 loc) · 4.15 KB
/
example.web.config
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Configuration for Microsoft IIS that enables the usage of non-crufty URLs.
Copied from http://code.gishan.net/code/web-config-for-pivotx-to-run-on-iis-url-rewrite/
See http://forum.pivotx.net/viewtopic.php?p=15593#p15593
-->
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Page">
<match url="^page/(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?uri={R:1}&rewrite=page" />
</rule>
<rule name="Category">
<match url="^category/(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?c={R:1}&rewrite=category" />
</rule>
<rule name="Tag">
<match url="^tag/(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?t={R:1}&rewrite=tag" />
</rule>
<rule name="Entry">
<match url="^entry/(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?e={R:1}&rewrite=entry" />
</rule>
<rule name="Search">
<match url="^search$" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?rewrite=search" />
</rule>
<rule name="Expand">
<match url="^browse/(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?o={R:1}&rewrite=offset" />
</rule>
<rule name="RSS">
<match url="^rss(/.*)?$" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="rss.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.web>
<customErrors mode="On" defaultRedirect="/error/500.html">
<error statusCode="404" redirect="/error/404.html"/>
</customErrors>
</system.web>
</configuration>