You can try this RewriteEngine On RewriteRule (.*)([0-9]{2}).html$ /20$2/$1$2.html [R,L]
I wrote it on the go and haven't tested it. It might be done in different way probably but give this one a go and will see what can we do if it is not working. Cheers On Tue, Jan 5, 2010 at 6:52 PM, Boyle Owen <owen.bo...@six-group.com> wrote: > > -----Original Message----- > > From: Reese [mailto:howel...@inkworkswell.com] > > Sent: Monday, January 04, 2010 5:34 PM > > To: users@httpd.apache.org > > Subject: [us...@httpd] Mod_Rewrite voodoo > > > > Hello everyone, > > > > I am restructuring a Web site and need to move a number of files to > > different subdirectories. The files have an embedded date code in > > [filename]DDMMYY.ext format, I was hoping to hook the YY.ext portion > > to redirect ...05.html files to the 2005/ subdirectory, ...06.html > > files to the 2006/ subdirectory, etc. > > > > This shouldn't be that difficult, but I'm not getting anywhere with > > the RewriteCond/RewriteRule pairs I've tried so far. Either I get > > 500 errors, create endless loops or the rule is not applied at all. > > > > How should a rewrite rule like this be formulated? > > What did you try so far? > > Rgds, > Owen Boyle > Disclaimer: Any disclaimer attached to this message may be ignored. > > > > > Reese > > > > > > --------------------------------------------------------------------- > > The official User-To-User support forum of the Apache HTTP > > Server Project. > > See <URL:http://httpd.apache.org/userslist.html> for more info. > > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > > " from the digest: users-digest-unsubscr...@httpd.apache.org > > For additional commands, e-mail: users-h...@httpd.apache.org > > > > > > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. If you receive > this message in error, please notify the sender urgently and then > immediately delete the message and any copies of it from your system. Please > also immediately destroy any hardcopies of the message. > The sender's company reserves the right to monitor all e-mail > communications through their networks. > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > " from the digest: users-digest-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >