caseman72/bend-baby-love/master/.htaccess - Htaccess File

caseman72/bend-baby-love/master/.htaccess

RedirectMatch 403 /..*$

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # no www
#  RewriteCond %{HTTP_HOST} ^bendbabylove. [NC]
#  RewriteRule ^(.*)$ http://www.bendbabylove.com/$1 [R=301,L]

  # REQUEST METHODS FILTERED
  RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK|DEBUG) [NC]
  RewriteRule ^(.*)$ - [F,L]

  # Uploaded content
  RewriteRule ^/?wp-content/uploads/(.*)$ http://bblfiles.s3.amazonaws.com/wp-content/uploads/$1 [L]

  # BPSQSE BPS QUERY STRING EXPLOITS
  # The libwww-perl User Agent is forbidden - Many bad bots use libwww-perl modules, but some good bots use it too.
  # Good sites such as W3C use it for their W3C-LinkChecker. 
  # Add or remove user agents temporarily or permanently from the first User Agent filter below.
  # If you want a list of bad bots / User Agents to block then scroll to the end of this file.
  RewriteCond %{HTTP_USER_AGENT} (libwww-perl|wget|python|nikto|curl|scan|java|winhttp|clshttp|loader) [NC,OR]
  RewriteCond %{HTTP_USER_AGENT} (%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
  RewriteCond %{HTTP_USER_AGENT} (;|<|>|'|"|)|(|%0A|%0D|%22|%27|%28|%3C|%3E|%00).*(libwww-perl|wget|python|nikto|curl|scan|java|winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
  RewriteCond %{THE_REQUEST} ? HTTP/ [NC,OR]
  RewriteCond %{THE_REQUEST} /* HTTP/ [NC,OR]
  RewriteCond %{THE_REQUEST} etc/passwd [NC,OR]
  RewriteCond %{THE_REQUEST} cgi-bin [NC,OR]
  RewriteCond %{THE_REQUEST} (%0A|%0D|\r|\n) [NC,OR]
  RewriteCond %{REQUEST_URI} owssvr.dll [NC,OR]
  RewriteCond %{HTTP_REFERER} (%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
  RewriteCond %{HTTP_REFERER} .opendirviewer. [NC,OR]
  RewriteCond %{HTTP_REFERER} users.skynet.be.* [NC,OR]
  RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
  RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(..//?)+ [OR]
  RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC,OR]
  RewriteCond %{QUERY_STRING} =PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC,OR]
  RewriteCond %{QUERY_STRING} (../|..) [OR]
  RewriteCond %{QUERY_STRING} ftp: [NC,OR]
  RewriteCond %{QUERY_STRING} http: [NC,OR] 
  RewriteCond %{QUERY_STRING} https: [NC,OR]
  RewriteCond %{QUERY_STRING} =|w| [NC,OR]
  RewriteCond %{QUERY_STRING} ^(.*)/self/(.*)$ [NC,OR]
  RewriteCond %{QUERY_STRING} ^(.*)cPath=http://(.*)$ [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C).*embed.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C)([^e]*e)+mbed.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C).*object.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C)([^o]*o)+bject.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C).*iframe.*(>|%3E) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|%3C)([^i]*i)+frame.*(>|%3E) [NC,OR] 
  RewriteCond %{QUERY_STRING} base64_encode.*(.*) [NC,OR]
  RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*([^)]*) [NC,OR]
  RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
  RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2}) [OR]
  RewriteCond %{QUERY_STRING} ^.*([|]|(|)|<|>|%3c|%3e|%5b|%5d).* [NC,OR]
  RewriteCond %{QUERY_STRING} ^.*(x00|x04|x08|x0d|x1b|x20|x3c|x3e|x5b|x5d|x7f).* [NC,OR]
  RewriteCond %{QUERY_STRING} (NULL|OUTFILE|LOAD_FILE) [OR]
  RewriteCond %{QUERY_STRING} (./|../|.../)+(motd|etc|bin) [NC,OR]
  RewriteCond %{QUERY_STRING} (localhost|loopback|127.0.0.1) [NC,OR]
  RewriteCond %{QUERY_STRING} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
  RewriteCond %{QUERY_STRING} concat[^(]*( [NC,OR]
  RewriteCond %{QUERY_STRING} union([^s]*s)+elect [NC,OR]
  RewriteCond %{QUERY_STRING} union([^a]*a)+ll([^s]*s)+elect [NC,OR]
  RewriteCond %{QUERY_STRING} (;|<|>|'|"|)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/*|union|select|insert|drop|delete|update|cast|create|char|convert|alter|declare|order|script|set|md5|benchmark|encode) [NC,OR]
  RewriteCond %{QUERY_STRING} (sp_executesql) [NC]
  RewriteRule ^(.*)$ - [F,L]

  RewriteRule ^index.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTP_REFERER, HTTP_USER_AGENT, QUERY_STRING, REQUEST_FILENAME, REQUEST_METHOD, REQUEST_URI, THE_REQUEST

Comments

Apache