httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Garnett <>
Subject [users@httpd] DocumentRoot overrides ReWrite
Date Mon, 24 Mar 2003 16:38:08 GMT
Excuse my ignorance as I get to grips with Apache.
I've tried all the resources I could but they don't
quite answer this.

I have a plain server, one IP address on Apache
2.0.42, no Virtual Hosts set up, default DocumentRoot.
This works OK with most things, but I want to catch
anything containing the string ".nsf" and rewrite it
to send a proxy request to a Domino HTTP server.
( e.g. http://hostname/dbase.nsf/index.htm proxies to
http://domsrv/dbase.nsf/index.htm )

I've written the rules (below), and in messing about
with creating virtual hosts I have actually seen the
rule working OK, so I think the syntax is fine.

However, without VHs I am getting HTTP-404 for these

the rewrite log shows nothing, whereas the access log
shows that the requests are being served (and failed)
from the DocumentRoot. 

I thought the Rewrite would rewrite ALL URIs , but it
seems that the DocumentRoot is being checked first.

Is there an order of precedence, or am I missing
something simple ?
Thanks,  A

Listen 8088
ServerName bend-iface
UseCanonicalName Off
DocumentRoot "D:/IBMHTTPServer2042/htdocs/en_US"
<Directory "D:/IBMHTTPServer2042/htdocs/en_US">
   Order allow,deny
   Allow from all
ProxyRequests on
RewriteEngine on
RewriteLog "c:\myrewrite.log"
RewriteLogLevel 9
RewriteCond %{SERVER_PORT} !^80$
RewriteCond %{REQUEST_URI} ^/(.+)(\.nsf/)(.+)$ [NC]
RewriteRule ^/(.+)  http://domsrv1:80/$1  [P]


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message