httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Haase-Thomas <...@meome-ag.de>
Subject [Q] RewriteMap
Date Fri, 08 Feb 2002 09:44:25 GMT
Hi all,

it is the first time I'm trying to implement a RewriteMap, and although 
I have some experience with regular expressions, something's going 
wrong. Maybe some of you got the answer - so here's my prob:

apache 1.3.22 on Debian Linux 2.4.17

httpd.conf:

    ServerName disp05
   ...
    RewriteEngine On
    RewriteLogLevel 4
    RewriteLog /var/log/apache/disp05/rewrite_log

    RewriteMap shortnames txt:/etc/apache/shortnames.txt
    RewriteCond %{REQUEST_FILENAME} /\w+
    RewriteRule (.*) ${shortnames:$1} [T=text/html,R=permanent,L]

As you may presume already, shortnames.txt looks like:
gesundheit http://disp05/app/jsp/categoryoverview_jsp/57285.html
hobby http://disp05/app/jsp/categoryoverview_jsp/85300.html
and so on

Now two strange things happen:
1. The RewriteCond doesn't match as it should do. For instance, if I 
send a request for 'http://disp05/hobby' it doesn't match.
2. If I change the condition (to an expression that always matches) 
applying the RewriteRule delivers 'http://disp05/' - which is absolutely 
not what it should do.

Well, maybe all this happens just because it's friday, but nevertheless:
has anyone got an idea what's going wrong?

Many thanx in advance
Martin



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message