On Wed, 5 Oct 2005, Jay Loden wrote:
> I'm having trouble with Apache and Mod_python - mod_python is set to use > /var/www/html and pass all *.htm files on to the handler I wrote. > Unfortunately, mod_python does a greedy match, so > /var/www/html/subdirectory/file.htm still gets passed to the handler! > Is there some way to limit the handler to the directory and NOT include > subdirectories? Hi Jay, You may want to ask the Apache folks about this one. Your question specific enough that the Apache folks will probably be better at this one than Python-Tutor. If you strip your question to its essentials, it really is an Apache configuration problem more than anything else; it really isn't related to Python except from the tangential relation to mod_python. The behavior you're seeing is how Apache deals with all Directory-specific directives: subdirectories "acquire" the properties of their parent directory. But from the notes in: http://httpd.apache.org/docs/2.0/sections.html http://httpd.apache.org/docs/2.0/mod/core.html#directory http://httpd.apache.org/docs/2.0/mod/mod_mime.html#removehandler it sounds possible for you to apply a RemoveHandler directive on the subdirectories of whatever parent directory you're trying not to handle. However, since we're really straying away from programming topics and into web-server system administration, I'd strongly recommend continuing this question on a mailing list like the one listed in: http://httpd.apache.org/lists.html#http-users _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor