I wish to redirect example.com/foo/[some string]FOOBAR to subdomain.example.com/[some string]Foobar
I’m using in my .htaccess file
RedirectMatch 301 /foo/(^.*$)FOOBAR http://subdomain.example.com/$1Foobar
which doesn’t work, just results in a 404
Any suggestions?
Most probably this is because you have the following rule:
where, you’ve put the
$inside the parenthesis! Try the following one: