Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-12-12 08:14:21

From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446

Redirect from old_domain/subfolder to new_domain

I moved the Japanese part of a previous MLP site to a separate domain.

It took me over a week to figure out how to redirect visitors from the old url of a Japanese language page to the new one, while visitors to English pages are not affected.

I tried all kinds of complex Rewrite rules on .htaccess, but the solution turned out to be painfully simple.

This is what I wanted to do:

Redirect from:
CURRENT ADDRESS: https://www.OLD_DOMAIN.com/ja/section/number/site_url
NEW ADDRESS: https://www.NEW_DOMAIN.com/section/number/site_url

This is the solution. Just add this to your .htaccess page:

Redirect permanent /ja https://www.NEW_DOMAIN.com
(replace “ja” with the name of your folder)

It smoothly redirects you from the old page to the old one. If you now click on any old link on Google, you end up at the right page on the new site without being the wiser. Meanwhile, permanent tells Google to index the new url and scrap the old one.

This is surely old hat for many of you. But none of the support people at my hosting service could help, and it took me a long time to find a page with this advice. So, perhaps it helps somebody else.

Last edited by Kjeld (2021-12-12 08:20:02)

Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)


Board footer

Powered by FluxBB