I need to create a
RedirectMatch 301 ^/bonus/ http://www.newdomain.com/bonus/ [L]
RedirectMatch 301 ^/ http://www.newdomain.com/ [L]
RedirectMatch 301 ^/bonus/ http://www.newdomain.com/bonus/ [L] RedirectMatch 301 ^/ http://www.newdomain.com/ [L]
These directives would never have worked, so it's hard to say why you are suddenly getting the error.
As you suggest the
[L] flag is what's causing the 500 Internal Server error. This is invalid syntax - but this has always been invalid syntax!?
RedirectMatch is a mod_alias directive. Whereas, trailing flags (such as
[L]), are a mod_rewrite (ie.
even if he goes to
But neither will those directives redirect the above URL. It will only redirect
www.olddomain.com/bonus/ (with a trailing slash). If you need to match the above URL then you need to remove the trailing slash from the directive. For example:
RedirectMatch 301 ^/bonus http://www.newdomain.com/bonus RedirectMatch 301 ^/ http://www.newdomain.com/