forked from xpressengine/xpressengine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
executable file
·59 lines (50 loc) · 1.72 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
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Deny hidden files(.*)
# ignores '.well-known/*'
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^\.well-known/.+$ - [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^\. - [L,R=404]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# allow for phpMyAdmin
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^phpMyAdmin/.* - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^web_installer/index.php - [L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^web_installer web_installer/index.php [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.php$ index.php [L]
# Allow
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^assets/.* - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^plugins/.* - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^storage/app/public/.* - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^favicon.*$ - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^robots.txt$ - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^[a-zA-Z0-9]+\.html?$ - [L]
# Standard routes
RewriteRule ^ index.php [L]
</IfModule>
## You may need to uncomment the following line for some hosting environments
#php_value default_charset UTF-8
#<IfModule mod_url.c>
#CheckURL On
#ServerEncoding UTF-8
#</IfModule>