httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] Mod_Rewrite voodoo
Date Sat, 09 Jan 2010 19:29:16 GMT
On Sat, Jan 9, 2010 at 1:37 PM, Reese <howell.r@inkworkswell.com> wrote:
> On 09-Jan-10 13:07, Eric Covener wrote:
>
>> To kill the looping:
>>
>> RewriteCond %{REQUEST_URI} ^/20\d+
>
> I tried:
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} subdomain\.domain\.ext
> RewriteCond %{REQUEST_URI} ^/20\d+
> RewriteRule (.*)(0[5-9]).html$ /20$2/$1$2.html [R=301,L]
>
> For http://subdomain.domain.ext/fileDDMMYY.ext there was no effect,
> that file loaded at that URL.

I think that condition needs negating, because you want your rule to
not have a chance to execute against the rewritten URL that will have
the leading date.

>
> If I specified http://subdomain.domain.ext/2009/fileDDMM09.ext
> (the file does exist and is the target of the redirect), then I
> received a looping error.
>
> So I tried swapping the positions of the two RewriteCond statements.
> That caused an internal server error.

Should not matter.


> I added DPI to the other flags in the RewriteRule line, it caused
> an internal server error.
Only available in the latest few releases.

>
> There's only just so much testing I can do on live files, when
> I'm testing voodoo I do not completely understand. I appreciate
> the assistance so far, but I'm really grasping at straws and
> would appreciate a bit more detail.

Why aren't you working on a test system?


-- 
Eric Covener
covener@gmail.com

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