R
R
romeo512018-06-11 14:37:11
htaccess
romeo51, 2018-06-11 14:37:11

How to make content substitution for a specific country and ip?

I'll try to explain in as much detail as possible. I need to implement through .htaccess the substitution of page content for users of certain countries and ip without changing the address. Let's say there is a site site.ru. It is necessary that the user with a certain ip and country specified in the condition remains on the site.ru/ domain, but at the same time sees the contents of the site.ru/podmena.php page. At the same time, users who do not fall under the conditions must see a normal site.ru
page There is this code:
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^85\.140\.2\.19$ [NC]
RewriteRule ^.*$ index3.php [L]
Almost what I need, but there is no filtering by country, what do I need to add for this? And also, tell me, please, how to specify a range instead of one ip

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question