httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13204] New: - RewriteRule with RewriteMap ignores default value
Date Wed, 02 Oct 2002 14:02:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13204>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13204

RewriteRule with RewriteMap ignores default value

           Summary: RewriteRule with RewriteMap ignores default value
           Product: Apache httpd-2.0
           Version: 2.0.42
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache@snakefarm.org


The RewriteRule directive ignores the default value that can be specified when
using a RewriteMap (at least for DBM RewriteMaps). It returns an empty string
instead if the key is not found:

RewriteMap domaindb dbm=db:/var/db-data/domains.db
RewriteRule ^/([^/]+)/(.*)     /${domaindb:$1|not-found.html}/$2

Should return '/not-found.html/$2' if $1 does not exist in domains.db, but it
returns //

This is what the RewriteLog says:

(3) applying pattern '^/([^/]+)/(.*)' to uri '/blafasel.de/'
(5) map lookup OK: map=domaindb[dbm] key=blafasel.de -> val=
(2) rewrite /blafasel.de/ -> //

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message