T
T
Thiago Alvarez2019-09-15 19:13:44
htaccess
Thiago Alvarez, 2019-09-15 19:13:44

Redirect in .htaccess from one page to another?

Website on WordPress, added multilingualism with polylang.
Now many pages give 404 because the urls have changed. Added prefixes ru and uz .
from examplesite.com/page to examplesite.com/ ru /page .
That is, if you go to examplesite.com/page . Then everything works
. And if examplesite.com/ ru /page . Then 404
So I rummaged through the internet, everyone writes one thing - make a redirect in .htaccess
help with the redirect.
I need to redirect
from help.uz/ru/profile to help.uz/profile and
c help.uz/uz/profile to help.uz/profile

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Thiago Alvarez, 2019-09-15
@thiago_alvarez

Solved the issue
just registered at the end
If there is a better option, please write. For example to make the domain dynamic.
So that some variable with the domain is substituted by itself http://%DOMAIN%/profile/

A
Adik Izat, 2019-09-16
@JaxAdam

Read about RegularExpressions in htaccess. Then use something likeRewriteRule ^(.*)$ ^string(.*)$0 [R=301, L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question