P
P
PavelScron2016-11-04 18:45:29
Programming
PavelScron, 2016-11-04 18:45:29

How not to give access to vget?

What to prescribe?
I tried different options, it still downloads.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2016-11-04
@PavelScron

1. read here
2. you can add this as
well 3. This is the 3rd option: the simplest, but VERY effective:

RewriteEngine on

######Block BAD traffic#######
RewriteCond %{HTTP:Accept-Language} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} !.*\s((\(.*\s.*\))|(\(compatible;\s.*http.*\))) [OR,NC]
RewriteCond %{HTTPS} on
RewriteCond %{SSL:SSL_TLS_SNI} =""
RewriteRule .* - [R=404,NC,L]

#Terms of Service
RewriteCond %{HTTP_COOKIE} !tos=accepted
RewriteCond %{REQUEST_URI} !^.*(terms-of-service.html)
RewriteRule .* /terms-of-service.html?%{REQUEST_URI}\?%{QUERY_STRING} [R,L]

PS: mod-rewrite-cheatsheet.com

R
romy4, 2016-11-04
@romy4

you can't directly prevent a site from downloading. It is equivalent to forbidding to open the site from the browser at all. you can't tell the difference between wget and a browser. you can only complicate bulk loading.

R
Rou1997, 2016-11-05
@Rou1997

Don't just ban it. Thinking at the deepest level, the twisted-pair cable has no idea whether wget is there or the browser, so it's possible to trick it anyway. If wget wasn't flexible enough, then they would build their own build from its source codes, or simply take a more professional approach to developing bots.
All you can do is complicate queries.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question