.htaccess Preventing requests with invalid characters

The solution for “.htaccess Preventing requests with invalid characters” can be found here. The following code will assist you in solving the problem.

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

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in