-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.config
More file actions
48 lines (43 loc) · 2.03 KB
/
web.config
File metadata and controls
48 lines (43 loc) · 2.03 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
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- Redirect /admin to admin.php -->
<rule name="Admin Redirect" stopProcessing="true">
<match url="^admin$" />
<action type="Rewrite" url="admin.php" />
</rule>
<!-- Redirect /login to login.php -->
<rule name="Login Redirect" stopProcessing="true">
<match url="^login$" />
<action type="Rewrite" url="login.php" />
</rule>
<!-- Redirect /logout to logout.php -->
<rule name="Logout Redirect" stopProcessing="true">
<match url="^logout$" />
<action type="Rewrite" url="logout.php" />
</rule>
<!-- Sitemap rewrite: /sitemap.xml -> sitemap.php -->
<rule name="Sitemap Redirect" stopProcessing="true">
<match url="^sitemap\.xml$" />
<action type="Rewrite" url="sitemap.php" />
</rule>
<!-- Category rewrite: /category/slug -> docs.php?cat=slug -->
<rule name="Category Rewrite" stopProcessing="true">
<match url="^category/([^/]+)$" />
<action type="Rewrite" url="docs.php?cat={R:1}" />
</rule>
<!-- Page rewrite: /slug -> docs.php?slug=slug -->
<rule name="Page Rewrite" stopProcessing="true">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<match url="^([^/]+)$" />
<action type="Rewrite" url="docs.php?slug={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>