-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.htaccess
More file actions
83 lines (75 loc) · 2.82 KB
/
.htaccess
File metadata and controls
83 lines (75 loc) · 2.82 KB
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
73
74
75
76
77
78
79
80
81
82
83
# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
ErrorDocument 403 https://bluebrad.net/denied?=yourdomain
#ErrorDocument 404 /404/
# alowse you to just use /deny skipping php or change the deny to what every you wish
RewriteRule ^deny$ /deny.php [L]
#if wordpress is used
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
# Redirects!
redirect /index.php?route=account/loginUpon /index.php?route=account/login
redirect /administrator /admin
redirect /blackhole https://bluebrad.net/blackhole/
Options +SymLinksIfOwnerMatch
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
</FilesMatch>
## BLOCK ##
Header set CF-IPCountry-Test "%{HTTP:CF-IPCountry}e"
# United States
# Allow only the United States (US) or change to your country
<RequireAny>
Require expr %{HTTP:CF-IPCountry} == 'US'
</RequireAny>
<RequireAll>
###################
Require expr %{HTTP:CF-IPCountry} != 'KR'
Require expr %{HTTP:CF-IPCountry} != 'UK'
Require expr %{HTTP:CF-IPCountry} != 'GB'
Require expr %{HTTP:CF-IPCountry} != 'CN'
Require expr %{HTTP:CF-IPCountry} != 'RU'
Require expr %{HTTP:CF-IPCountry} != 'IN'
Require expr %{HTTP:CF-IPCountry} != 'IT'
Require expr %{HTTP:CF-IPCountry} != 'TH'
Require expr %{HTTP:CF-IPCountry} != 'TR'
Require expr %{HTTP:CF-IPCountry} != 'NL'
Require expr %{HTTP:CF-IPCountry} != 'UA'
Require expr %{HTTP:CF-IPCountry} != 'DE'
Require expr %{HTTP:CF-IPCountry} != 'BR'
Require expr %{HTTP:CF-IPCountry} != 'ES'
Require expr %{HTTP:CF-IPCountry} != 'BY'
Require expr %{HTTP:CF-IPCountry} != 'CZ'
Require expr %{HTTP:CF-IPCountry} != 'EU'
## BLOCK THE IP OR HOST - THIS WILL UPDATE WITH THE DENY.PHP ##
Require not ip 176.227.215.131
Require not host scan03.fgxintel.com
Require not host orowave.com
Require not ip 84.17.43.195
Require not host unn-84-17-43-195.cdn77.com
Require not host ^.*\.cdn77\.com$
Require not ip 51.77.214.27
Require not ip 51.77.214.27
Require not host ^.*\.eu$
</RequireAll>
###################