S
S
Sergey2020-08-21 11:30:15
htaccess
Sergey, 2020-08-21 11:30:15

How to redirect from subfolder to subdomain?

Tell me how to make a redirect from site.by/by/
to bel.site.by in htacess?
and so that all pages that start on site.by/by/ are redirected to bel.site.by?
for example, so that all pages from the site.by/by/category/page type are redirected to bel.site.by

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2020-08-21
@sergeiy_permyakov

solved by redirecting to nginx
location ~ ^/by/(.*)$ {
return 301 $ scheme://bel.site.by/$1 ;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question