You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Ralf S. Engelschall" <rs...@engelschall.com> on 1997/04/15 13:43:42 UTC

Broken API / per-dir config create: SOLVED!

Ok, we are lucky, neither the API nor mod_rewrite is broken :-)

A few facts:

1. The rewrite rules of mod_rewrite got
   ignored for me last time, so I though it was a mod_rewrite problem in
   conjunction with the API. It is not. Because _ALL_ directives in such
   per-dir config files were ignored.  Mod_rewrite rules were just the ones I
   had there. I put "FUCK" into there and no error occured, so I knew that the
   hole file got ignored.
   -> No bug in mod_rewrite

2. I thought that the NULL for create_perdir_config() is 
   a bug, but is ok for the case where Apache creates its
   default configs. This is ok and intented this way.
   -> No bug in the API, just a little confusing case

3. Some of my rewriterules got still ignored. I didn't know why. Now I've
   discovered the problem. Under DocumentRoot I have symlinks to /u, /g and /e
   on my webservers (for user homedirs, group homedirs and entity homedirs).
   Then there are rulesets which rewrite /u/user/foo to these dirs. In the
   past there was a rule which uses the symlinks and thus rewrites to
   u/user/..., i.e. it uses the symlinks under DocumentRoot. Here the per-dir
   config files were found. One few days before I changed this to a ruleset
   which uses directly the absolute path /u/user instead of u/user. All worked
   fine.   

   BUT: While the Webpages are still found, the per-dir config files get
   ignored. Why? Hmmmmm... because my DocumentRoot has "AllowOverride All
   FileInfo" while the directory / has "AllowOverride None". See it? When the
   directory walk goes over DocumentRoot a per-dir config file gets parsed and
   its rewrite rules accepted. But when the per-server rulesets lead to a walk
   over the root-dir of the filesystem AllowOverride None is activated.
   VERY STRANGE! But...
   -> No bug in Apache directory walking, just a really
      strange problem which occurs when one rewrites over the rootdir while
      disallowing all there.  A candidate for the FAQ I think.
   
The only think currently don't works as expected are the redirects from
per-dir context. There the RewriteBase does not work as intented. I will
investigate in this problem, too.

BTW: I run the 1.2b8 under FreeBSD 2.2.1-RELEASE now for a few days but were
     not able to see some of the coredumps or process kills we know of.
     Hmmm... don't know if I should be happy or not about this fact...

Greetings,
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com