Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 5G BLACKLIST/FIREWALL
- # @ http://perishablepress.com/5g-blacklist/
- # 5G:[QUERY STRINGS]
- <ifModule mod_rewrite.c>
- RewriteEngine On
- RewriteBase /
- RewriteCond %{QUERY_STRING} (environ|localhost|mosconfig|scanner) [NC,OR]
- RewriteCond %{QUERY_STRING} (menu|mod|path|tag)\=\.?/? [NC,OR]
- RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]
- RewriteCond %{QUERY_STRING} echo.*kae [NC,OR]
- RewriteCond %{QUERY_STRING} etc/passwd [NC,OR]
- RewriteCond %{QUERY_STRING} \=\\%27$ [NC,OR]
- RewriteCond %{QUERY_STRING} \=\\\'$ [NC,OR]
- RewriteCond %{QUERY_STRING} \.\./ [NC,OR]
- RewriteCond %{QUERY_STRING} \? [NC,OR]
- RewriteCond %{QUERY_STRING} \: [NC]
- RewriteRule .* - [F]
- </ifModule>
- # 5G:[USER AGENTS]
- <ifModule mod_setenvif.c>
- SetEnvIfNoCase User-Agent ^$ keep_out
- SetEnvIfNoCase User-Agent (casper|cmsworldmap|diavol|dotbot) keep_out
- SetEnvIfNoCase User-Agent (flicky|ia_archiver|jakarta|kmccrew) keep_out
- SetEnvIfNoCase User-Agent (libwww|planetwork|pycurl|skygrid) keep_out
- SetEnvIfNoCase User-Agent (purebot|comodo|feedfinder|turnit) keep_out
- SetEnvIfNoCase User-Agent (zmeu|nutch|vikspider|binlar|sucker) keep_out
- <limit GET POST PUT>
- Order Allow,Deny
- Allow from all
- Deny from env=keep_out
- </limit>
- </ifModule>
- # 5G:[REQUEST STRINGS]
- <ifModule mod_alias.c>
- RedirectMatch 403 (https?|ftp|php)\://
- RedirectMatch 403 /(cgi|https?|ima|ucp)/
- RedirectMatch 403 /(Permanent|Better)$
- RedirectMatch 403 (\=\\\'|\=\\%27|/\\\'/?|\)\.css\()$
- RedirectMatch 403 (\,|//|\)\+|/\,/|\{0\}|\(/\(|\.\.\.|\+\+\+|\||\\\"\\\")
- RedirectMatch 403 \.(cgi|asp|aspx|cfg|dll|exe|jsp|mdb|sql|ini|rar)$
- RedirectMatch 403 /(contac|fpw|install|pingserver|register)\.php$
- RedirectMatch 403 (base64|crossdomain|localhost|wwwroot|e107\_)
- RedirectMatch 403 (eval\(|\_vti\_|\(null\)|echo.*kae|config\.xml)
- RedirectMatch 403 \.well\-known/host\-meta
- RedirectMatch 403 /function\.array\-rand
- RedirectMatch 403 \)\;\$\(this\)\.html\(
- RedirectMatch 403 proc/self/environ
- RedirectMatch 403 msnbot\.htm\)\.\_
- RedirectMatch 403 /ref\.outcontrol
- RedirectMatch 403 com\_cropimage
- RedirectMatch 403 indonesia\.htm
- RedirectMatch 403 \{\$itemURL\}
- RedirectMatch 403 function\(\)
- RedirectMatch 403 labels\.rdf
- RedirectMatch 403 /playing.php
- RedirectMatch 403 muieblackcat
- </ifModule>
- # 5G:[BAD IPS]
- <limit GET POST PUT>
- Order Allow,Deny
- Allow from all
- # uncomment/edit/repeat next line to block IPs
- # Deny from 123.456.789
- </limit>
- # disable the server signature
- ServerSignature Off
- # limit file uploads to 10mb
- LimitRequestBody 10240000
- #php_value max_execution_time 800
- #php_value max_input_time 800
- #php_value memory_limit 512M
- #php_value upload_max_filesize 30M
- #php_value post_max_size 30M
- Header unset ETag
- FileETag None
- # php compression – use with caution
- <ifmodule mod_php4.c>
- php_value zlib.output_compression 16386
- </ifmodule>
- <ifModule mod_gzip.c>
- mod_gzip_on Yes
- mod_gzip_dechunk Yes
- mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
- mod_gzip_item_include handler ^cgi-script$
- mod_gzip_item_include mime ^text/.*
- mod_gzip_item_include mime ^application/x-javascript.*
- mod_gzip_item_exclude mime ^image/.*
- mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
- </ifModule>
- <ifModule mod_expires.c>
- ExpiresActive On
- ExpiresDefault "access plus 1 seconds"
- ExpiresByType text/html "access plus 1 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 216000 seconds"
- ExpiresByType application/x-javascript "access plus 216000 seconds"
- </ifModule>
- <ifModule mod_headers.c>
- <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
- Header set Cache-Control "max-age=2592000, public"
- </filesMatch>
- <filesMatch "\\.(css)$">
- Header set Cache-Control "max-age=604800, public"
- </filesMatch>
- <filesMatch "\\.(js)$">
- Header set Cache-Control "max-age=216000, private"
- </filesMatch>
- <filesMatch "\\.(xml|txt)$">
- Header set Cache-Control "max-age=216000, public, must-revalidate"
- </filesMatch>
- <filesMatch "\\.(html|htm|php)$">
- Header set Cache-Control "max-age=1, private, must-revalidate"
- </filesMatch>
- </ifModule>
- <ifModule mod_headers.c>
- Header unset ETag
- </ifModule>
- FileETag None
- <Files wp-config.php>
- order allow,deny
- deny from all
- </Files>
- <files .htaccess="">
- order allow,deny
- deny from all
- </files>
- <Files ~ "^.ht">
- Order allow,deny
- Deny from all
- Satisfy All
- </Files>
- #custom error docs
- ErrorDocument 404 /404.shtml
- ErrorDocument 403 /403.shtml
- ErrorDocument 500 /500.shtml
- # BEGIN WordPress
- RewriteEngine On
- RewriteBase /
- RewriteRule ^index\.php$ - [L]
- # uploaded files
- RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
- RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]
- RewriteCond %{REQUEST_FILENAME} -f [OR]
- RewriteCond %{REQUEST_FILENAME} -d
- RewriteRule ^ - [L]
- RewriteRule . index.php [L]
- RewriteEngine On
- RewriteCond %{REQUEST_METHOD} POST
- RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
- RewriteCond %{HTTP_REFERER} !.*bloglines.co.za* [OR]
- RewriteCond %{HTTP_USER_AGENT} ^$
- RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
- # END WordPress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement