Received: (qmail 2730 invoked by uid 2012); 5 Oct 1998 12:26:23 -0000 Message-Id: <19981005122623.2729.qmail@hyperreal.org> Date: 5 Oct 1998 12:26:23 -0000 From: Klaus Johannes Rusch Reply-To: KlausRusch@atmedia.net To: apbugs@hyperreal.org Subject: Substitution does not support some schemes X-Send-Pr-Version: 3.2 >Number: 3140 >Category: mod_rewrite >Synopsis: Substitution does not support some schemes >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Oct 5 05:30:00 PDT 1998 >Last-Modified: Wed Oct 27 01:10:13 PDT 1999 >Originator: KlausRusch@atmedia.net >Organization: >Release: 1.3.2 >Environment: Win NT 4 SP3 >Description: Substitution only supports a limited number of schemes, namely http:, https:, ftp: and gopher:. RewriteEngine therefore cannot be used with other schemes like news: or mailto:. >How-To-Repeat: Add this to a config file: RewriteEngine On RewriteRule ^/mail mailto:webmaster@apache.org [R,L] >Fix: Check for schemename':' (and the special mod_rewrite schemes) rather than a fixed set of schemes. >Audit-Trail: State-Changed-From-To: open-feedback State-Changed-By: coar State-Changed-When: Tue Mar 23 15:19:57 PST 1999 State-Changed-Why: Please give an example of a URL you would expect to trigger the rewrite rule: RewriteEngine On RewriteRule ^/mail mailto:webmaster@apache.org [R,L] What would you expect it to do, and what does it do instead? From: Klaus Johannes Rusch To: apache-bugdb@apache.org, coar@apache.org, apbugs@apache.org Cc: Subject: Re: mod_rewrite/3140: Substitution does not support some schemes Date: Wed, 24 Mar 1999 10:01:04 CET Synopsis: Substitution does not support some schemes State: open : Please give an example of a URL you would expect to trigger : the rewrite rule: : : RewriteEngine On : RewriteRule ^/mail mailto:webmaster@apache.org [R,L] http://localhost/mail (probably with some RewriteCond in the configuration but for reproducing the problem this is not required) : What would you expect it to do, and what does it do instead? I would expect a redirect, i.e. Status 302 and Location: mailto:webmaster@apache.org headers, to be sent as for equivalent RewriteRules with other schemas, instead mod_rewrite searches for ${DOCUMENT_ROOT}/mailto:webmaster@apache.org and not finding that document sends a 404 Not Found. RewriteRule ^/mail http://www.domain.com/redirect.pl?url=mailto:webmaster@apache.org works okay. hook_uri2file has a hardcoded list of schemas (http://, https://, gopher://, ftp://), all other schemas are interpreted as local files (including common ones like file:, news:, mailto: and ldap: but also any other schema). Klaus Johannes Rusch -- KlausRusch@atmedia.net http://www.atmedia.net/KlausRusch/ State-Changed-From-To: feedback-open State-Changed-By: coar State-Changed-When: Thu Apr 29 13:41:00 PDT 1999 State-Changed-Why: [User sent response] Release-Changed-From-To: 1.3.2 WinNT-1.3.2 Release-Changed-By: coar Release-Changed-When: Thu Apr 29 13:41:00 PDT 1999 State-Changed-From-To: open-closed State-Changed-By: rse State-Changed-When: Wed Oct 27 01:10:12 PDT 1999 State-Changed-Why: Fixed for Apache 1.3.10. Thanks for your feedback. >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. ] [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! ]