I
I
Ivan Kozlov2016-11-05 07:15:37
htaccess
Ivan Kozlov, 2016-11-05 07:15:37

How to make a url system for regions?

There is a working online store. It ranks well in search engines. Now it is going to be promoted to other regions. It is necessary that each region has its own url and its own content. Content is clear. With Url, there is just a question:
Now the url is in this form:
mysite.ru/post_name, mysite.ru/category/my_category, etc.
It is necessary that the site remains working at the same url for the home region, for example, Moscow.
for Moscow
mysite.ru/post_name, mysite.ru/category/my_category, etc.
For other regions, there was a url of this kind
for Yekaterinburg
mysite.ru/ekb/post_name, mysite.ru/ekb/category/my_category, etc.
for Novosibirsk
mysite.ru/nsk/post_name, mysite.ru/nsk/category/my_category, etc.
etc. for all regions.
Do not offer regions on subdomains.
Similar functionality is carried by the Polylang plugin, only for languages ​​:)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2016-11-05
@trampick

Learn about add_rewrite_rule, see how the same Polylang works with it. The principle is exactly the same, because Polylang language is a hidden taxonomy. Your regions, in fact, too.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question