.htaccess Block requests with invalid characters – .htaccess December 22, 2011 Pramod T P Leave a comment Add the below given code in your .htaccess file RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} !^[A-Z]{3,9} [a-zA-Z0-9.+_/-?=&]+ HTTP/ [NC] RewriteRule .* – [F,NS,L]