httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reese <>
Subject Re: [users@httpd] Mod_Rewrite voodoo
Date Wed, 06 Jan 2010 15:45:29 GMT
On 05-Jan-10 02:52, Boyle Owen wrote:

>> 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.

> What did you try so far?

This, which seems to work but is too inclusive - it'll break links
to external sites that have the matching 05.html string:

RedirectMatch (.*)05\.html

Also this, which surely has syntax and other errors - it doesn't
work at all:

RewriteCond %{HTTP_HOST} ^www\.domain\.com$
RewriteRule (.*)05\.html$ http://www\.domain\.com\2005$1.html


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message