Redirecting multiple pages with a regular expression
-
Hi,
I am using the redirection plugin which is great for single pages but I’m struggling to get it to redirect pages where there are multiple pages of content.
So this will redirect just fine:
from: /items/green/ to: /items/green-products/
But if there are 10 pages of green products I want it to also forward page 2, 3, 4 et, etc so
/items/green/page/2/ to: /items/green-products/page/2/
Rather than add a long list I was hoping a regular expression could be used and I tried the following but it didn’t work:
/items/green/page/(.*) to: /items/green-products/page/$1
I’m assuming I’m just bad with regular expressions, can anyone see what is wrong here please.
Thanks
The topic ‘Redirecting multiple pages with a regular expression’ is closed to new replies.