-
Notifications
You must be signed in to change notification settings - Fork 51
/
.htaccess
39 lines (34 loc) · 1.85 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
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/attachment/.*
RewriteRule ^attachment/(.*)$ /static/$1 [PT]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{QUERY_STRING} ^([^:]*):([^:]*):([^:]*)(:([0-9a-z]*))?(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^([a-zA-Z0-9_-]*)%3A([a-zA-Z0-9_-]*)%3A([a-zA-Z0-9_-]*)(%3A([0-9a-z]*))?(.*)$ [NC]
RewriteRule ^public/static/(.*)/(.*)$ public/files/%2/_%5.centurion [NC,PT]
#Rewrite for static image (with effect)
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{QUERY_STRING} ^([^:]*):([^:]*):([^:]*):([0-9a-z]*)(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^([a-zA-Z0-9_-]*)%3A([a-zA-Z0-9_-]*)%3A([a-zA-Z0-9_-]*)%3A([0-9a-z]*)(.*)$ [NC]
RewriteRule ^public/files/.*$ /media/image/get/id/%1/fileid/%2/key/%3/effect/%4/extra/%5? [NC,R,L]
#Rewrite for static file
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{QUERY_STRING} ^([^:]*):([^:]*):([^:]*)(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^([a-zA-Z0-9_-]*)%3A([a-zA-Z0-9_-]*)%3A([0-9a-z]*)(.*)$ [NC]
RewriteRule ^public/files/.*$ /media/file/get/id/%1/fileid/%2/key/%3/extra/%4? [NC,R,L]
#Rewrite for cached file
#RewriteCond %{DOCUMENT_ROOT}/cached/index.html -f
#RewriteRule ^public/?$ public/cached/index.html [L]
#RewriteCond %{DOCUMENT_ROOT}/cached%{REQUEST_URI}.html -f
#RewriteRule public/.* public/cached%{REQUEST_URI}.html [L]
#RewriteCond %{DOCUMENT_ROOT}/cached%{REQUEST_URI}.css -f
#RewriteRule public/.* public/cached%{REQUEST_URI}.css [L]
#RewriteCond %{DOCUMENT_ROOT}/cached%{REQUEST_URI}.js -f
#RewriteRule public/.* public/cached%{REQUEST_URI}.js [L]
#RewriteCond %{DOCUMENT_ROOT}/cached%{REQUEST_URI}.xml -f
#RewriteRule public/.* public/cached%{REQUEST_URI}.xml [L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ public/index.php [NC,L]