RewriteEngine on # Some hosts require RewriteBase to make RewriteRules work. RewriteBase / # Google SEO workaround for search.php highlights: # Make this rule the first rewrite rule in your .htaccess! RewriteRule ^([^&]*)&(.*)$ https://forum.techinbermudas.com/$1?$2 [L,QSA,R=301] ### Firewall - Don't modify this line!! ServerSignature Off Options -Indexes RewriteEngine On RewriteCond %{REQUEST_URI} (settings\.php|config\.php|wp-config\.php|bb-config\.php) [NC,OR] RewriteCond %{REQUEST_URI} (timthumb\.php|phpthumb\.php|thumb\.php|thumbs\.php|debug\.log|error.log|attacks.log) [NC,OR] RewriteCond %{REQUEST_URI} \.(htaccess|htpasswd|errordocs|logs|po|mo|ini|inc)$ [NC,OR] RewriteCond %{THE_REQUEST} \/\*\ HTTP/ [NC,OR] RewriteCond %{THE_REQUEST} etc/passwd [NC,OR] RewriteCond %{THE_REQUEST} (\?|\*|%2a)+(%20+|\\s+|%20+\\s+|\\s+%20+|\\s+%20+\\s+)HTTP(:/|/) [NC,OR] RewriteCond %{HTTP_REFERER} (%0A|%0D|%27|%3C|%3E|%00) [NC,OR] RewriteCond %{THE_REQUEST} (`|<|>|'|"|%0A|%0D|%27|%3C|%3E|%00|%60|\\r|\\n) [NC,OR] RewriteCond %{HTTP_USER_AGENT} (`|<|>|'|"|%0A|%0D|%27|%3C|%3E|%00|%60|\\r|\\n) [NC,OR] RewriteCond %{QUERY_STRING} (`|<|>|'|"|%0A|%0D|%27|%3C|%3E|%00|%60|\\r|\\n) [NC,OR] RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [NC,OR] RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [NC,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} (\.\./|%2e%2e%2f|%2e%2e/|\.\.%2f|%2e\.%2f|%2e\./|\.%2e%2f|\.%2e/) [NC,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).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*(\x00|\x04|\x08|\x0d|\x1b|\x20|\x3c|\x3e|\x7f).* [NC,OR] RewriteCond %{QUERY_STRING} (NULL|OUTFILE|LOAD_FILE) [OR] RewriteCond %{QUERY_STRING} (\.{1,}/)+(motd|etc|bin) [NC,OR] RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [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} \-[sdcr].*(allow_url_include|allow_url_fopen|safe_mode|disable_functions|auto_prepend_file) [NC,OR] RewriteCond %{QUERY_STRING} (;|<|>|`|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00|%60).*(/\*|union|select|insert|drop|delete|update|cast|create|char|convert|alter|declare|order|script|set|md5|benchmark|encode) [NC,OR] RewriteCond %{HTTP_COOKIE} (;|<|>|`|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00|%60).*(/\*|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 ^(.*)$ 403.php [QSA,L] # Don't modify this line!! - End Firewall ### php_value memory_limit 256M php_value upload_max_filesize 256M php_value post_max_size 256M # Google SEO 404: ErrorDocument 404 /misc.php?google_seo_error=404 # Google SEO Sitemap: RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC] # Google SEO URL Forums: RewriteRule ^forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC] # Google SEO URL Threads: RewriteRule ^thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC] # Google SEO URL Announcements: RewriteRule ^announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC] # Google SEO URL Users: RewriteRule ^user\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC] # Google SEO URL Calendars: RewriteRule ^calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC] # Google SEO URL Events: RewriteRule ^event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]