Unexpected regex behaviour
-
I have this as a Regex redirect:
/journalism-fine-mass-media-business-models-ailing.*
redirecting to:
https://billbennett.co.nz/new-zealand-technology-journalism-twilight-years/
The idea is that it would pick up a URL like:
https://billbennett.co.nz/journalism-fine-mass-media-business-models-ailing/featured-image-19590/
Which it does… but it stores the .* part of the URL and adds that to the new one, so my redirect goes to:
https://billbennett.co.nz/new-zealand-technology-journalism-twilight-years/featured-image-19590/
How can I rewrite this so that it doesn’t store and forward the .*
I thought I would need to use (.*) in the source and $1 in the target for Regex to do the storing and forwarding.
The topic ‘Unexpected regex behaviour’ is closed to new replies.