httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Horgan <phorg...@yahoo.com>
Subject Re: [users@httpd] Mod_Rewrite voodoo
Date Wed, 06 Jan 2010 20:50:15 GMT
Reese wrote:
> On 06-Jan-10 13:16, Reese wrote:
>> On 05-Jan-10 17:43, Igor Cicimov wrote:
>>> You can try this
>>>
>>> RewriteEngine On
>>> RewriteRule (.*)([0-9]{2}).html$ /20$2/$1$2.html [R,L]
>
>> I'm also not sure what would prevent this from becoming endlessly
>> recursive, since the domain/2005/file013105.html file may still
>> get processed and redirected to domain/2005/2005/file013105.html,
>> etc. and etc. Is an [L] flag needed or something?
>
> Ah, it has it, now I see. Since this is expected to be permanent,
> then the flags should probably be [L,R=301] shouldn't they?
>
> Also, how would this be disabled for files with a date code that
> corresponds to calendar year 2010 (nameDDMMYY.ext)? It is needed
> for 2005-2009, but not other years - and not for external links.
> So adding RewriteCond %{HTTP_HOST} domain\.com is needed, yes?
>
> Reese
RewriteRule (.*)(0[0-9]).html$ /20$2/$1$2.html [R,L]
>
>
> ---------------------------------------------------------------------
> 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-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message