CCAFS/CCAFS-Climate/master/.htaccess
###### BEGIN CCAFS-CLIMATE ######
# default page to load.
DirectoryIndex index.php pages/index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# URL more readable and much shorter.
RewriteCond %{REQUEST_URI} !^/(pages|stations)
RewriteRule ^(.*).php /pages/$1.php [L]
RewriteRule ^(.*)/$ /pages/$1.php [L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*[^/]$ /$0/ [L,R=301]
</IfModule>
###### END CCAFS-CLIMATE ######
ErrorDocument 404 /pages/404.php
#There is no reason that an URL start with [.
RedirectMatch 403 [
#prevent folder browsing
Options All -Indexes
# END Extra Security
# 5G FIREWALL from PerishablePress.com
# 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,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
<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 (=\.|=\%27|/\./?|).css()$
RedirectMatch 403 (,|//|)+|/,/|{0}|(/(|...|+++||)
RedirectMatch 403 .(cgi|asp|aspx|cfg|dll|exe|jsp|mdb|sql|ini)$
RedirectMatch 403 /(contac|fpw|install|pingserver|register).php
RedirectMatch 403 (base64|crossdomain|localhost|wwwroot)
RedirectMatch 403 (eval(|_vti_|(null)|echo.*kae)
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
</IfModule>
On Github License
Files