Answer the question
In order to leave comments, you need to log in
How to 302 redirect a website folder to a folder on a subdomain?
Greetings!
Faced the problem of 302 redirects, there is a bilingual site on Joomla, multilingually arranged with site.com/ru site.com/en folders. They decided to update the site, made a new one on WP, multilingualism was done the same way, the Russian version is ready, and over the English. I still need to work on the version, I want to upload a new site and English. move the version temporarily to a subdomain until a new one is ready.
Task: make a 302 redirect site.com/en/*(WP) to old.site.com/en/*(Joomla)
Answer the question
In order to leave comments, you need to log in
Stop telling stories at last, ask a question right away, the rest is of no interest to anyone.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^site.com$
RewriteRule ^en/(.*?) http://old.site.com/en/$1
Decided by myself, it seems to work
RewriteEngine on
RewriteCond %{HTTP_HOST} ^site.com$
RewriteRule ^/en/[a-z,A-Z,0-9]/(.*)$ http://old.site.com/en/[a-z,A-Z,0-9]/(.*)$1 [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.|)site.com$
RewriteRule ^/en/.*/(.*)$ http://old.site.com/en/.*/(.*)$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question