-
Notifications
You must be signed in to change notification settings - Fork 4
/
.htaccess
118 lines (75 loc) · 4.64 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
php_value display_errors off
php_value display_startup_errors off
<IfFile /var/www/html/_control/debug>
php_value display_startup_errors on
php_value display_errors stderr
</IfFile>
# allow larger files to submitdiag
php_value upload_max_filesize 20M
php_value post_max_size 20M
RewriteEngine on
RewriteBase /
#### Control rules
RewriteRule "^_control/info$" "_control/info.php" [END]
RewriteRule "^_control/ready$" "_control/ready.php" [END]
#### Rewrites for /script folder: /search
RewriteRule "^search/2\.0" "/script/search/2.0/search.php" [END]
RewriteRule "^search(/1\.0)?" "/script/search/1.0/search.php" [END]
#### Rewrites for /script folder: /keyboard
RewriteRule "^keyboard/(.*)$" "/script/keyboard/keyboard.php?id=$1" [END]
#### Rewrites for /script folder: /increment-download
RewriteRule "^increment-download/(.*)$" "/script/increment-download/increment-download.php?id=$1" [END]
#### Rewrites for /script folder: /model
RewriteRule "^model(/)?$" "/script/model-search/model-search.php" [END]
RewriteRule "^model/(.*)$" "/script/model/model.php?id=$1" [END]
#### Rewrites for /script folder: /version
RewriteRule "^version(\/([^/]+)(\/([^/]+))?)?$" "/script/version/version.php?platform=$2&level=$4" [END]
RewriteRule "^version(\/)?$" "/script/version/version.php" [END]
#### Rewrites for /script folder: /package-version
RewriteRule "^package-version(\/1\.0)?(\/)?$" "/script/package-version/package-version.php" [END]
#### Rewrites for /script folder: /cloud to /script/legacy/...
# Language + keyboard map 4.0
RewriteRule "cloud/(4\.0\/)languages(\/([a-z0-9-]{2,}))(\/([a-z0-9_]+))" "/script/legacy/legacy40.php?context=language&languageid=$3&keyboardid=$5" [QSA,END]
# Language map 4.0
RewriteRule "cloud/(4\.0\/)languages(\/([a-z0-9-]{2,}))?" "/script/legacy/legacy40.php?context=language&languageid=$3" [QSA,END]
# Keyboard + Language Map 4.0
RewriteRule "cloud/(4\.0\/)keyboards(\/([a-z0-9_]+))(\/([a-z0-9-]{2,}))" "/script/legacy/legacy40.php?context=keyboard&keyboardid=$3&languageid=$5" [QSA,END]
# Keyboard map 4.0
RewriteRule "cloud/(4\.0\/)keyboards(\/([a-z0-9_]+))?" "/script/legacy/legacy40.php?context=keyboard&keyboardid=$3" [QSA,END]
# Language + keyboard map 3.0
RewriteRule "cloud/(3\.0\/)languages(\/([a-z0-9-]{2,}))(\/([a-z0-9_]+))" "/script/legacy/legacy30.php?context=language&languageid=$3&keyboardid=$5" [END]
# Language map 3.0
RewriteRule "cloud/(3\.0\/)languages(\/([a-z0-9-]{2,}))?" "/script/legacy/legacy30.php?context=language&languageid=$3" [END]
# Keyboard + Language Map 3.0
RewriteRule "cloud/(3\.0\/)keyboards(\/([a-z0-9_]+))(\/([a-z0-9-]{2,}))" "/script/legacy/legacy30.php?context=keyboard&keyboardid=$3&languageid=$5" [END]
# Keyboard map 3.0
RewriteRule "cloud/(3\.0\/)keyboards(\/([a-z0-9_]+))?" "/script/legacy/legacy30.php?context=keyboard&keyboardid=$3" [END]
# Language map 2.0
RewriteRule "cloud/(2\.0\/)languages(\/([a-z0-9-]{2,}))?" "/script/legacy/legacy20.php?context=language&languageid=$3" [END]
# Keyboard + Language Map 2.0
RewriteRule "cloud/(2\.0\/)keyboards(\/([a-z0-9_]+))(\/([a-z0-9-]{2,}))" "/script/legacy/legacy20.php?context=keyboard&keyboardid=$3&languageid=$5" [END]
# Keyboard map 2.0
RewriteRule "cloud/(2\.0\/)keyboards(\/([a-z0-9_]+))?" "/script/legacy/legacy20.php?context=keyboard&keyboardid=$3" [END]
# Language map
RewriteRule "cloud/(1\.0\/)?languages(\/([a-z0-9-]{2,}))?" "/script/legacy/legacy10.php?context=language&languageid=$3" [END]
# Keyboard map
RewriteRule "cloud/(1\.0\/)?keyboards(\/([a-z0-9_]+))?" "/script/legacy/legacy10.php?context=keyboard&keyboardid=$3" [END]
#### Keyman for Windows 14.0+ API endpoints
# windows/14.0+/update
RewriteRule "^windows/[1-9][0-9]\.[0-9]/update(.*)" "/script/windows/14.0/update/index.php$1" [END]
#### Keyman Desktop 10.0, 11.0, 12.0, etc API endpoints
# desktop/10.0-13.0/update
RewriteRule "^desktop/(10|11|12|13)\.[0-9]/update(.*)" "/script/desktop/10.0/update/index.php$2" [END]
# desktop/10.0/exception
# Note: this endpoint is also used by developer
RewriteRule "^desktop/[1-9][0-9]\.[0-9]/exception(.*)" "/script/desktop/10.0/exception/index.php$2" [END]
# desktop/10.0/isonline
RewriteRule "^desktop/[1-9][0-9]\.[0-9]/isonline(/?)$" "/script/desktop/10.0/isonline/index.php" [END]
# desktop/10.0/submitdiag
RewriteRule "^desktop/[1-9][0-9]\.[0-9]/submitdiag(/?)$" "/script/desktop/10.0/submitdiag/index.php" [END]
#### Keyman Developer 10.0 - 13.0 API endpoints
# developer/10.0/update
RewriteRule "^developer/(10|11|12|13)\.0/update(.*)" "/script/developer/10.0/update/index.php$2" [END]
#### Keyman Developer 14.0+ API endpoints
# developer/14.0+/update
RewriteRule "^developer/[1-9][0-9]\.[0-9]/update(.*)" "/script/developer/14.0/update/index.php$1" [END]