-
Hi Support Team,
I need to setup a Regex redirection rule to redirect everything that is not equal certain URLs.
For example:
I have https://test1.com.gb and https://test2.com.gb. And we are going to migrate from https://test1.com.gb to https://test2.com.gb.Let’s say on https://test1.com.gb I have thousands of pages (it’s hard to have a list of all URLs).
On https://test2.com.gb I have a hundred pages (which actually updated versions from test1 – we have a list).On test2 I have the next tree of pages:
https://test2.com.gb/news
https://test2.com.gb/support
https://test2.com.gb/contactSo, I need to redirect everything that is not equal:
https://test2.com.gb/news/*
https://test2.com.gb/support/*
https://test2.com.gb/contact/*
to the same locations on https://test1.com.gb (because we don’t have such pages on test2)In instance:
We open:
1 https://test2.com.gb/support/updated_page and get the same https://test2.com.gb/support/updated_page
2 https://test2.com.gb/old_page and get https://test1.com.gb/old_page
3 https://test2.com.gb/old_page2 and get https://test1.com.gb/old_page2
4 https://test2.com.gb/old_page1001 and get https://test1.com.gb/old_page1001We can’t calculate all “old_pages” so that’s why we need an exclude rule.
Thank you a bunch!
The ticket ‘Rank Math Regex Redirections – match everything except certain pages’ is closed to new replies.