I never got familiar with regex, so I struggle!
I need an expression after a relaunch of my website (Wordpress) where I need to rename part of a folder name into a new expression like. I use "Redirection" as a plugin that asks for two parameters: source and target urls.
What has to get redirected? www.test.com/old/sometext -> www.test.com/new/sometext
I tried ro find the first: ^/old/(.*) and to replcae it by:/new/$1
Well, nothing happens... Help is welcome!
Try:
and replace with
See it on Regex101: https://regex101.com/r/WXEyaN/latest
The issues seem to be:
a) the
^
tells the regex to be anchored at the start of a line - omit it.b) the
/
character needs to be escaped - instead write\/
.