I want to add 'rewrite condition' in .htcaccess but unfortunately I don't have access of that. Can I write conditions in functions.php ? If yes, how to achieve that ? I want to add these lines:
RewriteCond %{QUERY_STRING} ^.{1000,}$
RewriteRule ^wp-admin/load-scripts\.php$ - [F]
f
at the end should be[F]
. Is theRewriteRule
pattern intentionally uppercase?RewriteRule ^wp-admin/load-scripts\.php$ - [NC,F]
. The rule as written (all uppercase and noNC
flag) would fail to match the request it is trying to block. TheNC
flag would be required if you are running this on a Windows platform. And the lonef
at the end would trigger an immediate 500 Internal Server Error (since it's entirely invalid syntax)..htaccess
file. If you don't have permission to edit.htaccess
(or there is no.htaccess
) file then this isn't going to be possible. (Has this vulnerability not already been "fixed" inload-scripts.php
?)