[thelist] mod rewriting question

Tom Dell'Aringa pixelmech at gmail.com
Tue May 15 12:17:53 CDT 2007


On 5/15/07, Stephen Rider <evolt_org at striderweb.com> wrote:
>
>
> On May 15, 2007, at 7:56 AM, Tom Dell'Aringa wrote:
>
> > The old URL
> > http://www.crossandthrone.com/2005/01/01/happy-new-year/
> >
> > Needs to be 301 redirected to:
> > http://www.crossandthrone.com/articles/happy-new-year/
>
>
> Try something like this:
>
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^(0-9){4}/(0-9){2}/(0-9){2}/(.+?)/?$ /archives/$4/ [R=301,L]
> </IfModule>
>
> This entire block should go _before_ whatever rewrite block your CMS/
> blog has as default.


Thanks for the suggestion, that didn't work however. Wouldn't I need a rule
for each URL seeing how these are so unique?

Here is exactly what my .htaccess file looks like right now:

http://www.crossandthrone.com/htac.txt



More information about the thelist mailing list