S
S
Shing2017-03-06 15:08:23
linux
Shing, 2017-03-06 15:08:23

What does a city redirect look like via htaccess geoip?

The country is clear

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(RU)$
RewriteRule ^(.*)$ http://www.canada.com/$1 [L]

And the city?
32497,"RU","66","Saint Petersburg"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex F, 2017-03-17
@delvin-fil

BeautifulSoup+xmldoc to the rescue. Parsing is no problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question