httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PMilan...@nypl.org
Subject RE: [users@httpd] mod_rewrite Odd Behavior
Date Fri, 28 Jan 2005 16:27:53 GMT
That rule worked on the other box? I don't see how really, but I've never
tried something like that. I can see how it would loop though. I don't
think it has to do with the [L] though. I think that is non-issue. 

Can't explain why it worked in one and not the other, but I can tell you
that I don't think that mod_rewrite would offer any protection for
internal redirects. There may be a way to do a look-ahead on the rewrite. 

I think it would be like ^/?!index.php(.*)$ - OR

Perhaps put in a RewriteCond on REQUEST_FILENAME. 

RewriteCond %{REQUEST_FILENAME !(index.php)

You may want to check on that though.

> -----Original Message-----
> From: jason@period-three.com [mailto:jason@period-three.com]
> Sent: Friday, January 28, 2005 11:08 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] mod_rewrite Odd Behavior
> 
> I have exhausted all of the suggested options in the "Before You Ask"
> section except examining the source code, because I don't think the
> problem I'm experiencing exists on that level.
> 
> I am moving a site from a box running Apache1 on OpenBSD 3.5 to one
> running Apache2 on Fedora Core 2. The site makes heavy use of
> mod_rewrite, and when I move the rules to the new machine, all goes
> haywire.
> 
> My directives for mod_rewrite are as follows:
> 
> ----------------
> RewriteEngine On
> 
> RewriteRule ^/manage/(.*)$ /manage.php [L]
> RewriteRule ^/(.*)$ /index.php?r=$1 [L]
> ----------------
> 
> These conditions worked fine on the old box. Now the last condition
> seems to spin mod_rewrite into an endless internal redirect, as if
> completely ignoring the fact that it is to stop after matching once due
> to the [L] option.
> 
> Any suggestions? Need more information?
> 
> Thanks in advance,
> Jason Johnson
> 
> 
> ---------------------------------------------------------------------
> 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