vendredi 26 novembre 2021

How can I block harmful request from a browser with htaccess?

I have been having some troubles with DDOS or something like that. I have noticed that a lot of redirections to a website have been made through weird requests like: "porn, sex, etc"(this is an example, actual requests a little bit worse). I found out that you can ban them with some lines of code inside of .htaccess file. I have tried this as was offered, but it did not work:

RewriteCond %{HTTP_REFERER} ^https://?.(-|.)?%D0%BF%D0%B8%D1%81%D1%8F%20%D0%B2%20%D0%BC%D0%B0%D0%BD%D0%B4%D1%83(-|.)?.$ [NC,OR]

RewriteCond %{HTTP_REFERER} ^https://?.(-|.)?%D0%BF%D0%B8%D1%81%D1%8F%20%D0%B2%20%D0%B0%D0%BD%D1%83%D1%81(-|.)?.$ [NC,OR]

RewriteCond %{HTTP_REFERER} ^https://?.(-|.)?%D0%BF%D0%BE%D1%80%D0%BD%D0%BE%20%D0%BA%D0%B0%D0%BB%D1%8C%D1%8F%D0%BD%D0%BD%D0%B0%D1%8F(-|.)?.$ [NC]


Can anybody please help me resolve that ? I would really appreciate Your help ! Thanks in advance !




Aucun commentaire:

Enregistrer un commentaire