Return-Path: Delivered-To: apmail-httpd-bugs-archive@www.apache.org Received: (qmail 75123 invoked from network); 22 Aug 2009 10:05:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Aug 2009 10:05:35 -0000 Received: (qmail 42184 invoked by uid 500); 22 Aug 2009 10:05:57 -0000 Delivered-To: apmail-httpd-bugs-archive@httpd.apache.org Received: (qmail 42105 invoked by uid 500); 22 Aug 2009 10:05:56 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: "Apache HTTPD Bugs Notification List" List-Id: Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 42085 invoked by uid 99); 22 Aug 2009 10:05:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Aug 2009 10:05:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Aug 2009 10:05:53 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 98AA9234C1E9; Sat, 22 Aug 2009 03:05:32 -0700 (PDT) From: bugzilla@apache.org To: bugs@httpd.apache.org Subject: DO NOT REPLY [Bug 47722] New: Small error in the urlmapping example X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Apache httpd-2 X-Bugzilla-Component: Documentation X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: felix.schaefer@tu-dortmund.de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: bugs@httpd.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 22 Aug 2009 03:05:32 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=47722 Summary: Small error in the urlmapping example Product: Apache httpd-2 Version: 2.3-HEAD Platform: PC OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: Documentation AssignedTo: bugs@httpd.apache.org ReportedBy: felix.schaefer@tu-dortmund.de --- Comment #0 from Felix 2009-08-22 03:05:30 PDT --- At the end of http://httpd.apache.org/docs/2.3/en/urlmapping.html#user , there is ans example for user directories: """ AliasMatch ^/upages/([a-zA-Z0-9]+)/?(.*) /home/$1/public_html/$2 """ One could think the regex would only match "/upages/"+$login, maybe followed by "/"+$somestuff. The problem here is that the question mark makes the "/" between the 2 matches optional, and you end up with a regex more akin to "anything that begins with a small letter, a big letter or a number". Example: trying to access (with the above example) /upages/favicon.ico makes apache look for a /home/favicon directory. The improved AliasMatch I came up with, and which should solve the problem, would be: """ AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$ /home/$1/public_html/$3 """ This regex matches either "/upages/"+$login+"/"+$somestuff, or "/upages/"+$login, which I think fits more closely to the intent. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org