>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: [EMAIL PROTECTED] >Organization: apache >Release: 1.2.4 >Environment: [EMAIL PROTECTED]:/sierra/www/bin% uname -a SunOS eddie 5.5.1 Generic_103640-09 sun4u sparc SUNW,Ultra-1 [EMAIL PROTECTED]:/sierra/www/bin% ./httpd -v Server version Apache/1.2.4. [EMAIL PROTECTED]:/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 [EMAIL PROTECTED]:/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 <http://eddie.sierra.com//img> 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 <[EMAIL PROTECTED]> in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]
