I am trying to get the following group of urls to redirect to a single subfolder. I would like it to be one rule to deal with all of the urls because i will have a bunch more.
This is a bit contradictory. You don’t want to match everything, but you want “all” URLs to redirect. So let me ask a different way: Are there any URLs under subfolder/attachmentlibrary/safety/ that shouldn’t redirect?
Jeff is correct regarding your character range definition (lowercase letters not matching the digits) but I loathe inappropriate use of (.*) as it generates loops for the unsuspecting user trying to match EVERYTHING. (.*) does match everything but that’s also the problem as it will continue to match EVERYTHING (including every redirection) unless you can add an escape clause in your code.
Now, as to your problem: You have constant subdirectories up to the 7 digit subdirectory which contains albums.php - except for the last two where there are two 7 digit subdirectories in #4 and {garbage}.pdf in #5.
The “trick” to creating effective redirections is to look for a pattern for mod_rewrite to match and use in a redirection.
… but your code appears to only be attempting to replace the subfolder/attachmentlibrary/ with store/. Is that all you’re after? (I doubt if because of #4 and #5.) If so, go back and use Jeff’s (.*) as it will NOT loop because the redirection is NOT to itself but to the store subdirectory (and the {QUERY_STRING} is unaffected).
If not, I share Jeff’s confusion over exactly what it is you are trying to do. To me, a good specification (“specificity”) is important BEFORE attempting to write mod_rewrite code so please try to be as exact as you can in your next attempt to define your problem.