---- merging htaccess to reach destination with 1 hop
lucy24 - 8:49 pm on May 6, 2012 (gmt 0)
I'm a little confused. (Also a little dizzy. You may not realize that most browsers don't automatically wrap overlong lines, and I don't happen to have a 42" monitor.) It seems as if you already have the rules you need, such as
except for details. For example there's no reason to capture the year-month-day pieces if you won't be reusing them. And you should never say [NC] when something will be captured and reused; it just leaves you with an infinite number of URLs. Always include your preferred protocol and domain when redirecting. Otherwise the server will reattach whatever the user requested in the first place, which may not be the form you want.
QSA is not needed in either rule, because it is the default behavior of mod_rewrite. The flags say that Rule 2 is a Rewrite, but the protocol-plus-domain makes it into a Redirect just like Rule 1-- except that it's a 302 instead of the preferred 301. Anchors here are superfluous. By default, Regular Expressions start as soon as they can and go on as long as you can, so anchors are only needed when you're looking for some specific text in a specific location.
Use example.com (or dot.anything) in your examples. Subdomains other than with/without www don't work, darn it, but you can use any tld you like.