Hello,
we used to have our blog under mydomain.com/blog
, not it has moved to blog.mydomain.com
i’ve setup redirects of this type
/blog -> blog.mydomain.com
/blog/(.*) -> blog.mydomain.com/%1
the idea is that if someone ends up in an old website link e.g. www.mydomain.com/blog/post/1
it would be redirect to blog.mydomain.com/post/1
the point is that does not work. My guess is that the (.*)
matches till the /
so if there’s no slash e.g. www.mydomain/blog/123
or many www.mydomain/blog/post/123
the rule is not met.
especially my former blog does not have a ending \
so all the urls are of the form www.mydomain/blog/123
how can I fix it.? is there a way to say "all that is after /blog/*
redirect it to https://blog.mydomain.com/%1