I would like to redirect any URL that start with /oldpath/ and i assume that i will need regular expressions.
Examples:
I have activated "regular expressions" and tried the following inputs in "Source Path":
/oldpath/
… does not work as I would like. Everything containing /oldpath/ will be redirected, even if it is not starting with /oldpath/.
^/oldpath/(.*)$
… does nothing.
What would be the correct regular expression?
You need to put the regular expression for redirects between #
s. So yours should be #^/oldpath/(.*)$#
, though #^/oldpath/#
also works.