-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
55 lines (46 loc) · 2.03 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
RewriteEngine on
RewriteOptions inherit
Options +FollowSymLinks
AddDefaultCharset utf-8
<ifmodule mod_php4.c>
php_value zlib.output_compression 16386
</ifmodule>
AddType application/x-httpd-php .php .inc .html .htm
DirectoryIndex index.php index.html index.htm
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php)$
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^asset/.*
mod_gzip_item_exclude rspheader ^source-Encoding:.*gzip.*
</IfModule>
RewriteBase /
# Handling favicon rewrite
RewriteRule ^favicon\.ico$ source/asset/favicon.ico [NC,QSA,END]
RewriteRule ^favicon\.png$ source/asset/favicon.png [NC,QSA,END]
# Including your virtual directory structure
RewriteRule ^api\/$ /index.php?oapi=index [NC,QSA,END]
RewriteRule ^api\/(.*)$ /index.php?oapi=$1 [NC,QSA,END]
RewriteRule ^asset\/$ source/asset/ [NC,QSA,END]
RewriteRule ^asset\/(.*)$ source/asset/$1 [NC,QSA,END]
# Including your physical directory structure
RewriteRule ^fia$ fia/ [NC,QSA,END]
RewriteRule ^fia\/$ index.php?oredirect=index [NC,QSA,END]
RewriteRule ^fia\/(.*)$ index.php?oredirect=$1 [NC,QSA,END]
RewriteRule ^source$ source/ [NC,QSA,END]
RewriteRule ^source\/asset$ source/asset/ [NC,QSA,END]
RewriteRule ^source\/layout$ source/layout/ [NC,QSA,END]
RewriteRule ^source\/layout\/bit$ source/layout/bit/ [NC,QSA,END]
RewriteRule ^source\/layout\/slice$ source/layout/slice/ [NC,QSA,END]
RewriteRule ^source\/layout\/view$ source/layout/view/ [NC,QSA,END]
RewriteRule ^source\/module$ source/module/ [NC,QSA,END]
RewriteRule ^source\/$ index.php?oredirect=index [NC,QSA,END]
RewriteRule ^source\/(.*)$ index.php?oredirect=$1 [NC,QSA,END]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Options -Indexes
#RewriteRule ^(.*)$ $1.php [NC,QSA,END]
RewriteRule ^((?!favicon.ico$)(?!favicon.png$)(?!api\/.*$)(?!asset\/.*$)(?!source\/.*$)(?!_ignore\/.*$).*)$ /index.php?olink=$1 [NC,QSA,END]
ErrorDocument 403 /index.php?olink=E403
ErrorDocument 404 /index.php?olink=E404