W
W
Workandgo2020-06-17 11:33:21
htaccess
Workandgo, 2020-06-17 11:33:21

How to set up a redirect on a geo-dependent site?

On a geo-dependent site, the url looks like
site.ru/city/page Where the city
is substituted by ip automatically . it is necessary that, regardless of the city, there was a redirect from /page to /new page

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-06-17
@Workandgo

RedirectMatch 301 ^/([^/]+)/old-page$   /$1/new-page

Or
RewriteRule ^([^/]+)/old-page$ /$1/new-page [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question