-
Notifications
You must be signed in to change notification settings - Fork 1
/
.htaccess
33 lines (27 loc) · 1.04 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
<IfModule headers_module>
Header set X-Frame-Options SAMEORIGIN
</IfModule>
<IfModule rewrite_module>
RewriteEngine On
# Block access to storing directories
RewriteRule (^|/)\~ - [F]
# Access file without extension
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^(.+?)/?$ /$1.php [L]
# Remove index file
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\s/(|.*/)index\.php($|\s|\?) [OR]
# Remove file extension
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\s/(.*)\.php($|\s|\?)
RewriteRule (^|.+) /%1 [R=301,L]
# Web Manifest
RewriteRule ^manifest.webmanifest$ manifest.php [L]
# Filename-based cache busting
RewriteRule ^(.+)-(\d{1,10}+).css$ $1.min.css [L]
RewriteRule ^serviceworker$ serviceworker.php [L]
# URL rewrite and secure directories
RewriteCond %{THE_REQUEST} \s/+(\S+)
RewriteRule ^achieve([^\.css$].*)?$ achieve.php?url=%1 [B,L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{THE_REQUEST} \s/+(\S+)
RewriteRule (.*) index.php?i=%1 [B,L]
</IfModule>