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 http://domain.com/2005%1.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

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

Reply via email to