CIAT-DAPA/cwr_cwrdiversity.org/master/.htaccess - Htaccess File

CIAT-DAPA/cwr_cwrdiversity.org/master/.htaccess

### BEGIN CWR ######
<IfModule mod_rewrite.c>
RewriteEngine On
# URL more readable and much shorter.
# CWR Checklist
RewriteRule ^checklist/js/(.*).js /CWR-Checklist/themes/yamidoo-child/js/$1.js [L]
RewriteRule ^checklist/css/(.*).css /CWR-Checklist/themes/yamidoo-child/css/$1.css [L]
RewriteRule ^checklist/images/(.*).(jpg|gif|png) /CWR-Checklist/themes/yamidoo-child/images/$1.$2 [NC,L]
RewriteRule ^checklist/(.*).php /CWR-Checklist/pages/$1/$1.php [L]
# default page to load for checklist directory.
RewriteRule ^checklist/$ /CWR-Checklist/pages/search/search.php [L]

Redirect /inventory/ http://www.cwrdiversity.org/checklist/

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [L,R=301]

# CWR Distribution Map
RewriteRule ^distribution-map/js/(.*).js /CWR-DistributionMap/themes/yamidoo-child/js/$1.js [L]
RewriteRule ^distribution-map/css/(.*).css /CWR-DistributionMap/themes/yamidoo-child/css/$1.css [L]
RewriteRule ^distribution-map/images/(.*).(jpg|gif|png) /CWR-DistributionMap/themes/yamidoo-child/images/$1.$2 [NC,L]
RewriteRule ^distribution-map/(.*).php /CWR-DistributionMap/pages/$1/$1.php [L]
# default page to load for checklist directory.
RewriteRule ^distribution-map/$ /CWR-DistributionMap/pages/distribution-map/distribution-map.php [L]

RewriteRule ^distribution-map /distribution-map/ [L]

# Data Upload Process
RewriteRule ^upload/js/(.*).js /CWR-DataUpload/themes/yamidoo-child/js/$1.js [L]
RewriteRule ^upload/css/(.*).css /CWR-DataUpload/themes/yamidoo-child/css/$1.css [L]
RewriteRule ^upload/images/(.*).(jpg|gif|png) /CWR-DataUpload/themes/yamidoo-child/images/$1.$2 [NC,L]
RewriteRule ^upload/(.*).php /CWR-DataUpload/pages/$1/$1.php [L]

###### END CWR ######

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# BEGIN Extra Security
<files wp-config.php>
order allow,deny
deny from all
</files>

#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|rar)$
 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

Download PDF of Htaccess file
GET, HTTP_HOST, POST, PUT, QUERY_STRING, REQUEST_FILENAME, REQUEST_URI

Comments

Apache