-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
executable file
·62 lines (51 loc) · 3.04 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
## .htaccess for Jump Short URL API
##
## @link https://github.com/Chronolabs-Cooperative/Jump-API-PHP
## @author Dr. Simon A. Roberts <[email protected]>
## @package jump-api
## @version 1.2.2
##
##
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(test.api)$
RewriteRule ^test.api?format=(php|json|serial|xml)$ ./test.php?response=$1&action=test&version=v2 [L,NC,QSA]
RewriteRule ^test.api$ ./test.php?response=json&action=test&version=v2 [L,NC,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} ([a-z0-9]){1,64}.(localhost|snails.email)$
RewriteCond %{REQUEST_URI} ^(items|item|keywords|keyword).(html)$
RewriteRule ^([0-9]+)/([0-9]+)/(.*?)/(asc|desc)/items.html$ ./items.php?start=$1&limit=$2&sort=$3&direction=$4&mode=items [L,NC,QSA]
RewriteRule ^([0-9]+)/([0-9]+)/(.*?)/([0-9a-zA-Z]+)/item.html$ ./items.php?year=$1&week=$2&title=$3&referee=$4&mode=item [L,NC,QSA]
RewriteRule ^([0-9a-zA-Z]+)/item.html$ ./items.php?hash=$1&mode=item [L,NC,QSA]
RewriteRule ^items.html$ ./items.php?start=1&limit=30&sort=last&direction=desc&mode=items [L,NC,QSA]
RewriteRule ^(.*?)/keyword.html$ ./keyword.php?token=$1&mode=keyword [L,NC,QSA]
RewriteRule ^keywords.html$ ./keywords.php?start=1&limit=30&sort=count&direction=desc&mode=keywords [L,NC,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} ([a-z0-9]){1,64}.(localhost|snails.email)$
RewriteCond %{REQUEST_URI} ^(favicon|icon|url|index|jimage|jicon).(ico|png|jpg|gif|api|html)$
RewriteRule ^([0-9a-zA-Z]+)/j(image|icon).(png|jpg|gif)$ ./images.$2.php?hash=$1&format=$3 [L,NC,QSA]
RewriteRule ^favicon.ico$ ./assets/images/favicon.ico [L,NC,QSA]
RewriteRule ^icon.png$ ./assets/images/icon.png [L,NC,QSA]
RewriteRule ^url.api$ ./index.php?action=url [L,NC,QSA]
RewriteRule ^index.html$ ./index.php [L,NC,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} ([a-z0-9]){1,64}.(localhost|snails.email)$
RewriteCond %{REQUEST_URI} ^assets/(media|css|jquery|images|swf|js)/(.*?)$
RewriteRule ^/(media|css|jquery|images|swf|js)/(.*?)/(.*?)/(.*?)$ ./assets/$1/$2/$3/$4 [L,NC,QSA]
RewriteRule ^/(media|css|jquery|images|swf|js)/(.*?)/(.*?)$ ./assets/$1/$2/$3 [L,NC,QSA]
RewriteRule ^/(media|css|jquery|images|swf|js)/(.*?)$ ./assets/$1/$2 [L,NC,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} ([a-z0-9]){1,64}.(localhost|snails.email)$
RewriteCond %{REQUEST_URI} ^([a-z0-9]{2})/(.*?)$
RewriteRule ^([a-z0-9]{2})/url.api$ ./index.php?action=url [L,NC,QSA]
RewriteRule ^([a-z0-9]{2})/(.*?)$ ./index.php?action=jump&item=$2&version=$1 [L,NC,QSA]
RewriteEngine On
RewriteCond %{REQUEST_URI} ^data/(php|json|serial|xml)$
RewriteRule ^(data)/(php|json|serial|xml)/(.*?)$ ./index.php?action=$1&response=$2&item=$3 [L,NC,QSA]
RewriteCond %{HTTP_HOST} (.*?).([a-z0-9]){1,64}.(localhost|snails.email)$
RewriteRule ^(data)/(php|json|serial|xml)$ ./index.php?action=$1&response=$2&subdomain=1 [L,NC,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} (.*?).([a-z0-9]){1,64}.(localhost|snails.email)$
RewriteCond %{REQUEST_URI} ^(index).(html)$
RewriteRule ^$ ./index.php?action=jump&subdomain=1 [L,NC,QSA]
RewriteEngine On
RewriteRule ^$ http://%{HTTP_HOST}/index.html [L,R=301]