[thelist] mod rewriting question

Tom Dell'Aringa pixelmech at gmail.com
Tue May 15 18:24:51 CDT 2007

On 5/15/07, Stephen Rider <evolt_org at striderweb.com> wrote:
> RewriteRule ^[0-9]{4}(/[0-9]{2}){2}/([^/]+)/?$ /articles/$2/ [R=301,L]

This does work fine except for the one case with the leading number. The
problem is though - it blows out the CSS :( Any idea why? Is there some way
to exclude it writing out CSS paths? That seems odd that it did so, but the
moment I enabled it things blew up, and when I removed it, it all went back
to normal.

Someone on the drupal list suggested this instead:

  RewriteCond %{REQUEST_URI} ^[0-9]{4}/[0-9]{2}/[0-9]{2}/(.+?)/?$ [NC]
  RewriteCond %{REQUEST_URI} !^.*\.css.*$ [NC]
  RewriteRule . /articles/$1/ [R=301,L]

However, while this does fix the CSS problem, the rewrites don't work at


More information about the thelist mailing list