-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
45 lines (31 loc) · 1.27 KB
/
.htaccess
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
<Files .htaccess>
order deny,allow
deny from all
</Files>
<Files index.php>
order allow,deny
allow from all
</Files>
ErrorDocument 404 /notfound.php
RewriteEngine on
RewriteRule \.(css|jpe?g|gif|png)$ - [L]
# news/page/1 -> /?p=news&page=xy
RewriteRule ^news\/page\/(\d+)\/?$ \/index.php?p=news&page=$1 [L]
# forums/add -> /?p=forums&action=add
RewriteRule ^forums\/add\/?$ \/index.php?p=forums&action=add [L]
# forums/edit -> /?p=forums&action=edit
RewriteRule ^forums\/edit\/?$ \/index.php?p=forums&action=edit [L]
# forums/category/1 -> /?p=forums&cat=xy
RewriteRule ^forums\/category\/([^\/\.]+)\/?$ \/index.php?p=forums&cat=$1 [L]
# forums/edit/5 -> /?p=forums&action=edit&tid=5
RewriteRule ^forums\/edit\/([^\/\.]+)\/?$ \/index.php?p=forums&action=edit&tid=$1 [L]
# forums/edit/5/2 -> /?p=forums&action=edit&tid=5&pid=2
RewriteRule ^forums\/edit\/([^\/\.]+)\/([^\/\.]+)\/?$ \/index.php?p=forums&action=edit&tid=$1&pid=$2 [L]
# search/xy -> /?p=search&term=xy
RewriteRule ^search\/([^\/\.]+)\/?$ \/index.php?p=search&term=$1 [L]
# maps/cp_xy -> /?p=maps#cp_xy
RewriteRule ^maps\/([^\/\.]+)\/?$ \/index.php?p=maps#$1 [L]
# /xy -> /?p=xy
RewriteRule ^([^\/\.]+)\/?$ \/index.php?p=$1 [L,QSA]
# /xy/4 -> /?p=xy&id=4
RewriteRule ^([^\/\.]+)\/([^\/\.]+)\/?$ \/index.php?p=$1&id=$2 [L,QSA]