Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 21869 invoked by uid 6000); 20 Nov 1997 19:10:01 -0000 Received: (qmail 21848 invoked by uid 2001); 20 Nov 1997 19:10:00 -0000 Received: (qmail 20320 invoked by uid 2012); 20 Nov 1997 19:07:19 -0000 Message-Id: <19971120190719.20319.qmail@hyperreal.org> Date: 20 Nov 1997 19:07:19 -0000 From: Philip Hallstrom Reply-To: philip@sierra.com To: apbugs@hyperreal.org X-Send-Pr-Version: 3.2 Subject: mod_rewrite/1440: Rewrite has problems with urls such as "http://foo/bar//goo.html" (double //'s) Sender: apache-bugdb-owner@apache.org Precedence: bulk >Number: 1440 >Category: mod_rewrite >Synopsis: Rewrite has problems with urls such as "http://foo/bar//goo.html" (double //'s) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu Nov 20 11:10:00 PST 1997 >Last-Modified: >Originator: philip@sierra.com >Organization: apache >Release: 1.2.4 >Environment: philip@eddie:/sierra/www/bin% uname -a SunOS eddie 5.5.1 Generic_103640-09 sun4u sparc SUNW,Ultra-1 philip@eddie:/sierra/www/bin% ./httpd -v Server version Apache/1.2.4. philip@eddie:/sierra/www/bin% ./httpd -l Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_rewrite.c mod_access.c mod_auth.c mod_auth_dbm.c mod_browser.c mod_bandwidth.c philip@eddie:/sierra/www/bin% >Description: I have a pretty normal setup, with the following RewriteRule entries in httpd.conf: RewriteEngine on RewriteRule ^/img/(.*) http://www.sierra.com/img/$1 (Basically, anything in the top level 'img' directory should be pulled from our live server). However, when I request I get a directory listing of the top level img directory on eddie instead of getting forwarded to the top level img directory on www.sierra.com. So it seems that the Rewrite stuff is being called before the server cleans up the URL -- such as replacing // with /. Not that big of a deal, since people shouldn't put // in their URLs anyway, but it happened at least once. >How-To-Repeat: http://eddie.sierra.com//img is an example how it goes wrong. http://eddie.sierra.com/img gets redirected to http://www.sierra.com/img >Fix: Re-arrange the order of how the modules get called... clean up the URL first and then pass it on to the modules. Honestly I haven't looked at the src much so I'm not sure if this is possible... Let me know if I can help out in any way >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]