forked from scummvm/scummvm-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
59 lines (49 loc) · 1.54 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
# Enable mod_rewrite
RewriteEngine On
# Set the base for the rewritten URLs
RewriteBase /
##
# Images linked directly from the wiki need to work
##
RewriteRule ^screenshots/(.+)\.(jpg|png)$ data/screenshots/$1.$2 [NS,L]
##
# Forward old page requests to the new fancy URLs
##
# Compatibility page, with args
RewriteCond %{QUERY_STRING} version=(DEV|[0-9\.rc]+)(&details=(.+))?
RewriteRule ^compatibility\.php$ compatibility/%1/%3/? [NS,R=301]
# Documentation page, with args
RewriteCond %{QUERY_STRING} view=md5
RewriteRule ^documentation\.php$ documentation/md5sums/? [NS,R=301]
# News page, with args
RewriteCond %{QUERY_STRING} shownews=([0-9]{8}).xml [OR]
RewriteCond %{QUERY_STRING} shownews=(archive)
RewriteRule ^(index\.php)?$ news/%1/? [NS,R=301]
# Feeds (not pretty)
RewriteRule ^feed-(atom|rss)(20)?.php$ feeds/$1/? [NS,R=301]
# Other pages, without args
RewriteRule ^(.+)\.php$ $1/? [NS,R=301]
##
# Basic rewrite
##
RewriteRule ^([a-z]+)/?$ ?p=$1
##
# Compatibility
##
RewriteRule ^(compatibility)(/(DEV|[0-9\.rc]+)(/([^/]+))?)?/?$ ?p=$1&v=$3&t=$5 [L]
##
# Documentation
##
RewriteRule ^(documentation)(/([^/]+))?/? ?p=$1&d=$3 [L]
##
# Feeds
##
RewriteRule ^(feeds)/(atom|rss)/? ?p=$1&f=$2 [L]
##
# News
##
RewriteRule ^(news)(/([0-9]{8}[a-z]?|archive))?/?$ ?p=$1&d=$3 [L]
##
# Screenshots
##
RewriteRule ^(screenshots)(/([a-z]+)(/([-_a-z0-9]+)(/([0-9]+))?)?)?/? ?p=$1&cat=$3&game=$5&num=$7 [L]