N
N
n1kflt2017-08-12 08:39:54
PHP
n1kflt, 2017-08-12 08:39:54

How to allow access to only one user agent via .htacess?

It is necessary to allow access to the site to only one user agent, and to prohibit the rest.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fixid, 2017-08-12
@Fixid

SetEnvIfNoCase User-Agent .*google.* search_robot
SetEnvIfNoCase User-Agent .*yahoo.* search_robot
SetEnvIfNoCase User-Agent .*bot.* search_robot
SetEnvIfNoCase User-Agent .*ask.* search_robot

Order Deny,Allow
Deny from All
Allow from env=search_robot

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question