/
.htaccess
40 lines (34 loc) · 1.4 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
AddDefaultCharset UTF-8
DefaultLanguage en-US
#removing the need for ‘www’
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.msahil432.com [NC]
RewriteRule ^(.*)$ http://msahil432.com/$1 [L,R=301]
ErrorDocument 400 http://go.msahil432.com/400.html
ErrorDocument 401 http://go.msahil432.com/401.html
ErrorDocument 403 http://go.msahil432.com/403.html
ErrorDocument 404 http://go.msahil432.com/404.html
ErrorDocument 500 http://go.msahil432.com/500.html
ErrorDocument 502 http://go.msahil432.com/502.html
ErrorDocument 504 http://go.msahil432.com/504.html
# disable directory browsing
Options All -Indexes
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 86400 seconds"
ExpiresByType application/x-javascript "access plus 86400 seconds"
</IfModule>
<IfModule mod_rewrite.c>
SetEnvIfNoCase ^User-Agent$ .*(bot1|bot2|bot3|bot4|bot5|bot6|) HTTP_SAFE_BADBOT
SetEnvIfNoCase ^User-Agent$ .*(bot1|bot2|bot3|bot4|bot5|bot6|) HTTP_SAFE_BADBOT
Deny from env=HTTP_SAFE_BADBOT
</ifModule>
AccessFileName ht.access