httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Drukman <...@cluttered.com>
Subject [users@httpd] mod_rewrite doesn't always prefix with document_root
Date Fri, 17 Mar 2006 23:02:26 GMT
I've got the following rule in my config:

rewriterule ^/e3/(.*) /misc/e3/$1 [L]

It doesn't work.  If I change the "/misc" to "/test", it does.

Here's what's in the rewrite log for the bad case:  (edited for brevity)

(2) init rewrite engine with requested uri /e3/index.html
(3) applying pattern '\.ini$' to uri '/e3/index.html'
(3) applying pattern '^/e3/(.*)' to uri '/e3/index.html'
(2) rewrite /e3/index.html -> /misc/e3/index.html
(2) local path result: /misc/e3/index.html
(1) go-ahead with /misc/e3/index.html [OK]

Here's the good case:

(2) init rewrite engine with requested uri /e3/index.html
(3) applying pattern '\.ini$' to uri '/e3/index.html'
(3) applying pattern '^/e3/(.*)' to uri '/e3/index.html'
(2) rewrite /e3/index.html -> /test/e3/index.html
(2) local path result: /test/e3/index.html
(2) prefixed with document_root to /var/httpd/sandbox/test/e3/index.html
(1) go-ahead with /var/httpd/sandbox/test/e3/index.html [OK]


Notice how in the good case it's doing "prefixed with document_root 
to..."  Why would it skip that in the first case?  Is it because I have 
a /misc directory on my filesystem?  How do I get it to always look 
within the document_root first?

-jsd-


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message