httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Haase-Thomas <...@meome-ag.de>
Subject mod_rewrite
Date Tue, 08 Jan 2002 10:45:09 GMT
Hi all,

some hours ago I've encountered a very startling problem concerning 
mod_rewrite.

I'm running an apache 1.3.22. While configuring it to serve special 
pages instead of the originally requested ones, I'm running into a 
stunning effect. Here are the lines from httpd.conf:

<VirtualHost one.of.those.ips>
    User websrv
    Group websrv
    ServerName display
    ...
    RewriteEngine on
    RewriteLog /var/log/apache/display/rewrite_log
    RewriteLogLevel 4   # a higher level won't show much more
    ...
    RewriteCond %{REQUEST_FILENAME} (/\d+|\.html)$
    # avoid recursion:
    RewriteCond %{REQUEST_FILENAME} !/html/
    # 6.) change path and test:
    RewriteRule (.*/)fn(/.*) $1html$2  [NS,C,QSA]
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -s   
    ...
</VirtualHost>

This has already been working fine for several days, but today I get the 
following result in rewrite_log:
 RewriteCond: input='/app/fn/categoryoverview_jsp/85434.html' 
pattern='!/html/' => matched
(2) rewrite /app/fn/categoryoverview_jsp/85434.html -> 
/app/html/categoryoverview_jsp/85434.html
(3) applying pattern '(.*)' to uri 
'/app/html/categoryoverview_jsp/85434.html'
(4) RewriteCond: 
input='/home/display/app/html/categoryoverview_jsp/85434.html' 
pattern='-s' => not-matched

One should expect now that the file is missing, or we don't have the 
permissions to perform the test, but here's
the directory listing:
drwxrwx--x    2 websrv   websrv       4096 Jan  8 12:43 .
drwxr-sr-x   10 websrv   websrv       4096 Dec 13 13:09 ..
-rw-r--r--    1 websrv   websrv      15596 Jan  7 18:11 103295.html
-rw-r--r--    1 websrv   websrv      29200 Jan  7 18:11 57208.html
-rw-r--r--    1 websrv   websrv      27164 Jan  8 11:23 57218.html
-rw-r--r--    1 websrv   websrv      27107 Jan  7 18:11 57224.html
-rw-r--r--    1 websrv   websrv      29400 Jan  7 18:11 57232.html
-rw-r--r--    1 websrv   websrv      31046 Jan  7 18:11 57236.html
-rw-r--r--    1 websrv   websrv      29752 Jan  7 18:11 57238.html
-rw-r--r--    1 websrv   websrv      29018 Jan  7 18:11 57244.html
-rw-r--r--    1 websrv   websrv      27939 Jan  7 18:11 57249.html
-rw-r--r--    1 websrv   websrv      31951 Jan  7 18:11 57285.html
-rw-r--r--    1 websrv   websrv      26114 Jan  7 18:11 65466.html
-rw-r--r--    1 websrv   websrv      29837 Jan  7 18:11 85300.html
-rw-r--r--    1 websrv   websrv      20968 Jan  8 12:43 85434.html
-rw-r--r--    1 websrv   websrv      28561 Jan  7 18:11 85446.html

As you can see the file exists, we have the permissions (and 
furthermore: the timestamp says it has been newly created, which 
happened through a process belonging to websrv.websrv)

There are no typos in pathnames or whatsoever. I don't have any idea 
what is happening. Anyone of you?
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