Реально ли запретить доступ к сайту с определенной сети?

СР
На сайте с 21.12.2021
Offline
17
#41
Romanov Roman #:

Список подсетей для блокировки я вставил в файл .htaccess. В самый конец файла. Никаких глюков не заметил.

И как наблюдения? Эффект сохраняется?

X
На сайте с 04.12.2018
Offline
279
#42
 А реально не запрет, а редирект на другой сайт для них как то сделать? 
Удобный съем позиций (http://allpositions.ru/redirect/58277)
J
На сайте с 20.02.2014
Offline
120
jkm
#43
Xubart #:
 А реально не запрет, а редирект на другой сайт для них как то сделать? 

При срабатывании "Deny From" клиент получает ошибку 403.
Свою страницу ошибки можно указать с помощью ErrorDocument.

Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as http in front of it), Apache HTTP Server will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server. This has several implications, the most important being that the client will not receive the original error status code, but instead will receive a redirect status code.


Т.е. если указать адрес с http:// или https://, то клиент получит не 403, а редирект 302.

ErrorDocument 403 http://domain/page

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий