Htaccess File

cjerrington/cjerrington.github.io/master/.htaccess

HTTP_REFERER, HTTP_USER_AGENT
###Block Spam Countries

SetEnvIfNoCase User-Country "RU" spam=yes
SetEnvIfNoCase User-Country-Code "RU" spam=yes
SetEnvIfNoCase User-Country "Russia" spam=yes
SetEnvIfNoCase User-IPCountry "RU" spam=yes
SetEnvIfNoCase Country "RU" spam=yes
SetEnvIfNoCase Country-Code "RU" spam=yes
SetEnvIfNoCase Country "Russia" spam=yes
SetEnvIfNoCase IPCountry "RU" spam=yes
Order allow,deny
Allow from all
Deny from env=spam

####Block Country
SetEnvIf GEOIP_COUNTRY_CODE RU badcountry=yes
SetEnvIf GEOIP_COUNTRY_CODE UA badcountry=yes
SetEnvIf GEOIP_COUNTRY_CODE CN badcountry=yes
Order allow,deny
Allow from all
Deny from env=badcountry

#####Block Location
SetEnvIf IPCountry RU naughty=yes
SetEnvIf IPCountry UA naughty=yes
SetEnvIf IPCountry CN naughty=yes
Order allow,deny
Allow from all
Deny from env=naughty

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} humanorightswatch.org [NC,OR]
RewriteCond %{HTTP_REFERER} humanorightswatch.com[NC, OR]
RewriteCond %{HTTP_USER_AGENT} humanorightswatch.org [NC, OR]
RewriteCond %{HTTP_USER_AGENT} humanorightswatch.com [NC]
RewriteRule ^(.*)$ http://econom.co/
RewriteRule .* - [F]

<IfModule mod_headers.c>
    # WEEK
    <FilesMatch ".(jpg|jpeg|png|gif|swf)$">
        Header set Cache-Control "max-age=604800, public"
    </FilesMatch>

    # WEEK
    <FilesMatch ".(js|css|swf)$">
        Header set Cache-Control "max-age=604800"
    </FilesMatch>
</IfModule>
Exit mobile version