You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Greg Rumple <gr...@hway.net> on 1998/12/15 04:34:12 UTC

mod_rewrite/3532: When a user hits a site that the rewrite rule get's executed, apache goes into a infinite loop consuming ram.

>Number:         3532
>Category:       mod_rewrite
>Synopsis:       When a user hits a site that the rewrite rule get's executed, apache goes into a infinite loop consuming ram.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Dec 14 19:40:01 PST 1998
>Last-Modified:
>Originator:     grumple@hway.net
>Organization:
apache
>Release:        1.3.3
>Environment:
IRIX 6.2, 6.4, 6.5.1, and Linux 2.0.36
>Description:
The following rewrite rule causes apache to run at 100% cpu and consume tons of ram until I kill it.  It creates basically an infinite rewrite rule.  This behaved properly in 1.2.6, and now I have had to modify the rewrite rule.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.rumple.net
RewriteRule ^(.*) http://www.rumple.net/$1

If I modify the rewrite rule as follows it works fine.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.rumple.net
RewriteRule ^(.*) http://www.rumple.net/$1 [L,R]

The downside to this is it actually causes a redirect in my browser, where as before it was just an internal rewrite.  The real catch is I have lots of users who have this exact rewrite rule in their .htaccess files, and one by one I am having to hand patch these.
>How-To-Repeat:

>Fix:
Nope..
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]