Menu Close

How to Prevent Requests with Invalid Characters Using htaccess file

You can check our free domain suggestion tool here  Register .com From $14.8 ; .net $16.49; .org $16.99

You can use Mod_Rewrite to deny requests containing invalid characters,

RewriteEngine On 
RewriteBase / 
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ [a-zA-Z0-9\.\+_/\-\?\=\&]+\ HTTP/ [NC] 
RewriteRule .* - [F,NS,L] 

You can also Employ Basic URL Spelling Check to auto-correct simple spelling errors in the URL.

# automatically corect simple speling erors
<IfModule mod_speling.c>
 CheckSpelling On
</IfModule>
(Visited 4 times, 1 visits today)

Leave a Reply