views:

55

answers:

1

I have a set of dated folders I want to move into one container folder. That is

20011104 20011008

will now be in

archive/20011104 archive/20011104

is there any way to htaccess redirect these in a few lines, rather than one redirect for each. There are hundreds. Is it possible to do a wildcard like 200* such that all such requests get redirected into the archive folder?

+1  A: 

Yes, since you know it will start with 200, and will be 8 digits long, you should be able to match with this:

RewriteRule    (200\d{5})$     /archive/$1 [L,QSA]

Edit: I'm assuming you're using mod_rewrite

Matt