Page is a not externally linkable
lucy24 - 4:19 am on Jan 28, 2013 (gmt 0)
Put a blank line after each Rule.
Oops, yes.
After.
After.
After.
Otherwise, the current protocol, servername, and port number will be used to generate the URL sent with the redirect.
.. and that's exactly why you need to spell it out. Otherwise you get:
user asks for
www.example.com/oldname
is redirected to
www.example.com/newname
user asks for
example.com/oldname
is redirected to
example.com/newname
user asks for
www.example.com:1234/oldname
is redirected to
www.example.com:1234/newname
... and then you have to redirect them all over again to get your hostname canonicalized in your final RewriteRule. The human user won't notice-- unless they are on a very very slow connection-- but search engines get huffy if there is more than one redirect. And, of course, your server has to do extra work because it ends up processing three requests instead of two.