Y
Y
Ysery2019-04-08 10:45:08
Apache HTTP Server
Ysery, 2019-04-08 10:45:08

htaccess - give another page on direct access. How?

Good day, dear experts.
A direct access to a specific page with different IP bots is carried out. How to display a different page for them, i.e. those who do not have a referrer.
Here is such a code, it displays another page, but how to enter a check so that this is done only if there is no referrer

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^material\.html$ statya.html
</IfModule>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2019-04-08
@BorisKorobkov

RewriteEngine On
RewriteCond %{HTTP_REFERER} !.*example.com.*$
RewriteRule ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question