fastread homefastrread library fastread menu

htaccess : Preventing requests with invalid characters

Tutorial by:Shenila      Date: 2016-05-18 03:23:09

❰ Previous Next ❱

If you wish, you can use Mod_Rewrite to deny requests containing invalid characters, please be aware that with certain site setups this may break links.
To enable this, create a .htaccess file following the main instructions and guidance, and include the following text:

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

❰ Previous Next ❱