-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
72 lines (58 loc) · 2.08 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
#Options -Multiviews
#Options +FollowSymLinks
RewriteEngine On
RewriteBase /blua-blue2/
# turn off www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# force ssl
#RewriteCond %{HTTPS} off
#RewriteCond %{REQUEST_URI} !/img/
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Apache-fix: get Authorization header
RewriteEngine On
RewriteRule .* - [e=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# add trailing slashes if not real file
RewriteCond %{SERVER_PORT} !^3000$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !pagespeed
RewriteCond %{REQUEST_FILENAME} !phpmyadmin
#RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteCond %{REQUEST_URI} !(/$|(?<!ui)\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
#RewriteRule ^(.*[^/])$ /$1/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !lib\/ui\.
RewriteCond %{REQUEST_FILENAME} !phpmyadmin
RewriteRule ^(.*)?/$ index.php?action=$1&%{QUERY_STRING} [L]
# redirect node_modules to
# remove for native use or set to [R=301]
RewriteRule ^node_modules/(.*)$ _neoan/base/Node.php?action=$1&%{QUERY_STRING} [L,NC]
# redirect to default API-endpoint:
# {root}/api.v1/
RewriteRule ^api.(.*)$ _neoan/api/index.php [L,NC]
# redirect to fileserver:
# {root}/serve.file/
RewriteRule ^serve.file/(.*)$ _neoan/base/FileServe.php?action=$1&%{QUERY_STRING} [L,NC]
# caching for css & js & img
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month 1 days"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/javascript "access plus 1 month 1 week"
ExpiresByType application/x-javascript "access plus 1 month 1 days"
</IfModule>
#pagespeed_module
<IfModule pagespeed_module>
ModPagespeedEnableFilters extend_cache
ModPagespeedDisallow "*"
</IfModule>
#override htpasswd of possible higher folder
#Satisfy Any
#Order Allow,Deny
#Allow from all