phranque - 8:45 pm on Aug 27, 2013 (gmt 0)
The use of RewriteRule to perform this task may be appropriate if there are other RewriteRule directives in the same scope. This is because, when there are Redirect and RewriteRule directives in the same scope, the RewriteRule directives will run first, regardless of the order of appearance in the configuration file.
with mod_alias, you can only send external redirects and you can only match url paths.
this means if you are doing any of the following, you are probably using mod_rewrite (RewriteRule) and should avoid using mod_alias (Redirect):
- an internal rewrite
- a redirect based on the query string matching
- a redirect based on hostname matching
some of the ill effects from this situation include:
- exposure of (internal) rewritten urls in a subsequent (external) mod_alias Redirect
- a url gets redirected with a more general mod_rewrite redirect instead of firing the more specific mod_alias redirect
- multiple redirect hops to reach the canonical url