Can I write 'RewriteCond' using 'functions.php'?

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]

Topic rewrite-rules mod-rewrite functions php security Wordpress

Category Web


use this https://wordpress.org/plugins/wp-htaccess-editor/, if you are not willing to use any plugin, understand the code and implement in functions.php or your own custom plugin. cheers.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.