Beauty 172 Posted May 2, 2020 Report Share Posted May 2, 2020 Цитата RewriteEngine On RewriteCond %{HTTP_REFERER} ^(.*)\.site1\.(.*) [NC,OR] RewriteCond %{HTTP_REFERER} ^(.*)\.site2\.(.*) [NC,OR] RewriteCond %{HTTP_REFERER} ^(.*)\.site3\.(.*) [NC,OR] RewriteCond %{HTTP_REFERER} ^(.*)\.site4\.(.*) RewriteRule .? - [F] подскажите что не так делаю, не блокирует site1 если у него субдомен. Суть такая чтобы блокировать все site1, site2 и тд и их субдомены, я так понимаю ошибка тут ^(.*)\. подскажите как правильно блокировать все субдомены и сам сайт? Quote Link to post Share on other sites
world-seo 88 Posted May 2, 2020 Report Share Posted May 2, 2020 RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*site1\.(.*) [NC,OR] Quote Link to post Share on other sites
Beauty 172 Posted May 2, 2020 Author Report Share Posted May 2, 2020 а если http? будет работать? надо чтоб http(s) блокировало, потом любой субдомен или www потом вхождение слова и потом любое окончание com/ru/net не важно суть какая меня анализаторы спамят переходами, задолбали, так вот у них всегда меняется субдомен и бывает с http бывает https... в общем хочу их поблокировать Quote Link to post Share on other sites
petroff 643 Posted May 2, 2020 Report Share Posted May 2, 2020 17 часов назад, Beauty сказал: я так понимаю ошибка тут ^(.*)\. RewriteEngine On RewriteCond %{HTTP_REFERER} site1.com [NC, OR] RewriteCond %{HTTP_REFERER} site2.com [NC, OR] RewriteCond %{HTTP_REFERER} site3.com [NC] RewriteRule .* – [F] Quote Link to post Share on other sites
Beauty 172 Posted May 3, 2020 Author Report Share Posted May 3, 2020 21 час назад, petroff сказал: RewriteEngine On RewriteCond %{HTTP_REFERER} site1.com [NC, OR] RewriteCond %{HTTP_REFERER} site2.com [NC, OR] RewriteCond %{HTTP_REFERER} site3.com [NC] RewriteRule .* – [F] а если www.site1.com будет? поставил от world-seo решение то вроде работает Quote Link to post Share on other sites
vertas52 142 Posted May 3, 2020 Report Share Posted May 3, 2020 И сколько таких строк Вы планируете вписывать? Этот файл будет перечитываться при каждом запросе к серверу. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.