forked from NeoFrag/NeoFrag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
29 lines (21 loc) · 881 Bytes
/
.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
Options +FollowSymLinks -Indexes -MultiViews
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
##If your NeoFrag directory is not at http root
##you need to replace "/" by the correct directory, for example "RewriteBase /neofrag/"
RewriteBase /
##Allow direct access to specific directories
#RewriteCond %{REQUEST_URI} ^/(dir1|dir2)/
#RewriteRule .* - [L,QSA]
RewriteCond %{REQUEST_URI} !^/backups/
##Allow direct access to specific files
#RewriteCond %{REQUEST_FILENAME} /file1\.php [OR]
#RewriteCond %{REQUEST_FILENAME} /file2\.php [OR]
RewriteCond %{REQUEST_FILENAME} \.(png|jpg|jpeg|gif|swf|eot|svg|ttf|woff|woff2|zip)$
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L,QSA]
RewriteCond %{REQUEST_URI} \.html
RewriteRule (.*)\.html(.*) $1$2 [R=301,L]
RewriteRule .* index.php [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
</IfModule>