I’m trying to create a regex that takes a filename like:
/cloud-support/filename.html#pagesection
and redirects it to:
/cloud-platform/filename#pagesection
Could anyone advise how to do this?
Currently I’ve got part-way there, with:
"^/cloud-support/(.*)$" => "/cloud-platform/$1",
which redirects the directory okay – but still has a superfluous .html.
Could I just match for a literal .html with optional #? How would I do that?
Thanks.
Maybe something like this:
where the first group is a non-greedy match (.*?)