Insom842022-01-28 14:58:30
URL Handling
Insom84, 2022-01-28 14:58:30

301 redirect in htaccess (no prefix in the middle of url)?

There are pages https://site.ua/ru/bla-bla
How to make all pages containing /ru/ redirect to without /ru/. Those. with the example above on https://site.ua/bla-bla The
question is, how to register one redirect for all pages of this type?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Alexander Karabanov, 2022-01-28

For Nginx:

location /ru/ {
    rewrite ^/ru/(.*)$ https://сайт.ua/$1 break;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question