Reputation: 181
We have a lot of duplicate pages on our website and this is of course effecting our Search engine rankings. The duplicate pages are just old pages that are not redirecting. I have figured out how to do the redirect but I will need to do it by writing a regular expression which I'm struggling with.
Examples of the duplicate pages:
/language-communication/nursery-rhymes/people-puppets-packs/?ev=search
/maths-numeracy/dyscalculia/bus-stop/?ev=search
/sale/inclusion/harvest-rings/?ev=search
How would you write a regular expression that would pick the above 3 URLS?
Upvotes: 1
Views: 37
Reputation: 1016
This should work for the above:
\/([a-zA-Z0-9_\-]+\/){3}\?ev=search
Upvotes: 2