forked from TheGamesDB/TheGamesDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
87 lines (60 loc) · 3.21 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
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
RewriteEngine On
RewriteBase /
###### SITE URL REWRITING RULES
#### GAME PAGE
## http://thegamesdb.net/?tab=game&id={90} => http://thegamesdb.net/game/{90}/
RewriteRule ^game/([0-9]+)(/?)$ index.php?tab=game&id=$1 [NC,QSA,L]
#### EDIT GAME PAGE
## http://thegamesdb.net/?tab=game-edit&id={90} => http://thegamesdb.net/game-edit/{90}/
RewriteRule ^game-edit/([0-9]+)(/?)$ index.php?tab=game-edit&id=$1 [NC,QSA,L]
#### SEARCH PAGE (WITH SEARCH STRING)
## http://thegamesdb.net/index.php?string={Sonic+the+Hedgehog}&tab=listseries&function=Search => http://thegamesdb.net/search/{Sonic+the+Hedgehog/}
RewriteRule ^search/([a-z0-9\-\ \+]+)(/?)$ index.php?tab=listseries&string=$1&function=Search [NC,QSA,L]
#### SEARCH PAGE (WITH ANY ADDITIONAL PARAMETERS)
## http://thegamesdb.net/index.php?tab=listseries&function=Search => http://thegamesdb.net/search/}
RewriteRule ^search(/?)$ index.php?tab=listseries&function=Search [NC,QSA,L]
#### BROWSE PAGE
## http://thegamesdb.net/index.php?tab=listplatform => http://thegamesdb.net/browse/
RewriteRule ^browse/([0-9+]*)(/?)$ index.php?tab=listplatform&stringPlatform=$1&function=Browse+By+Platform [NC,QSA,L]
#### PLATFORM PAGE (ID)
## http://thegamesdb.net/?tab=platform&id={90} => http://thegamesdb.net/platform/{90}/
RewriteRule ^platform/([0-9]+)(/?)$ index.php?tab=platform&id=$1 [NC,QSA,L]
#### PLATFORM PAGE (ALIAS)
## http://thegamesdb.net/?tab=platform&id={alias} => http://thegamesdb.net/platform/{alias}/
RewriteRule ^platform/([a-z0-9\-]+)(/?)$ index.php?tab=platform&alias=$1 [NC,QSA,L]
#### EDIT PLATFORM PAGE
## http://thegamesdb.net/?tab=platform-edit&id={90} => http://thegamesdb.net/platform-edit/{90}/
RewriteRule ^platform-edit/([0-9]+)(/?)$ index.php?tab=platform-edit&id=$1 [NC,QSA,L]
#### FAVORITES PAGE
RewriteRule ^favorites(/?)$ index.php?tab=favorites [NC,QSA,L]
#### MESSAGE PAGE
## http://thegamesdb.net/?tab=message&id={90} => http://thegamesdb.net/message/{90}/
RewriteRule ^message/([0-9]+)(/?)$ index.php?tab=message&messageid=$1 [NC,QSA,L]
#### ADMINSTATS PAGE (TO-DO: FLESH OUT WITH ALL STATS PERMIATATIONS)
## http://thegamesdb.net/?tab=adminstats&statstype={topratedgames} => http://thegamesdb.net/adminstats/{top-rated-games}
RewriteRule ^adminstats/([a-z0-9\-]+)(/?)$ index.php?tab=adminstats&statstype=$1 [NC,QSA,L]
#### BLOG/NEWS (WordPress)
# http://www.thegamesdb.net/blog => http://thegamesdb.net/blog/
RewriteRule ^blog(/?)$ blog/ [NC,QSA,L]
#### Wiki (MediaWiki)
# http://www.thegamesdb.net/wiki => http://thegamesdb.net/wiki/
RewriteRule ^wiki(/?)$ wiki/ [NC,QSA,L]
#### Forum (PhpBB)
# http://www.thegamesdb.net/forums => http://thegamesdb.net/forums/
RewriteRule ^forums(/?)$ forums/ [NC,QSA,L]
#### PhpMyAdmin
# http://www.thegamesdb.net/phpmyadmin => http://thegamesdb.net/phpmyadmin/
RewriteRule ^phpmyadmin(/?)$ phpmyadmin/ [NC,QSA,L]
#### BASIC TAB REWRITING (MUST BE LAST RULE)
# http://www.thegamesdb.net/?tab={tab-value} => http://thegamesdb.net/{tab-value}/
RewriteRule ^([a-z0-9\-\ \+]+)(/?)$ index.php?tab=$1 [NC,QSA,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress