-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
36 lines (28 loc) · 829 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
30
31
32
33
34
35
36
## discoverubi.com htaccess
## GitHub does not support htaccess
RewriteEngine On
# Force rewrite to https for all traffic
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Force non-www
RewriteCond %{HTTP_HOST} ^www.discoverubi.com [NC]
RewriteRule ^(.*)$ https://discoverubi.com/$1 [L,R=301]
# Restrict htaccess file - STRONG protection
<Files ~ "^.*\.([Hh][Tt][Aa])">
Order allow,deny
Deny from all
Satisfy all
</Files>
# Disable Indexing / Directory Listing
Options -Indexes
# Deny access to filenames starting with dot(.)
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
# Block `dev` folder - Comprehensive
RedirectMatch 403 ^/dev/?$
RedirectMatch 403 ^/dev/.*$
RewriteRule ^dev/?$ - [F,L]
# Block access to SCSS files
RewriteRule ^(css/\.scss) - [F,L,NC]