[mod_python] Bizarre problems with rewriting URLs?

Graham Dumpleton grahamd at dscpl.com.au
Mon Oct 16 00:16:58 EDT 2006


Aaron Gallagher wrote ..
> On Oct 15, 2006, at 6:31 PM, Graham Dumpleton wrote:
> > By all means post that part of your configuration which is  
> > relevant, but also
> > state which version of mod_python you are using. Also make it clear 
> > whether you
> > have different parts of the URL namespace with their own PythonHandler
> > directives and whether you have separated them if possible by  
> > tagging them
> > against different Python interpreter instances using PythonInterpreter
> > directive or otherwise.
> 
> Here's excerpts from my configuration files:
> 
> <Directory /home/gethabbo/public_html>
>          SetHandler mod_python
>          PythonHandler questionable
>          PythonAuthenHandler questionable

What does your authenhandler do? Does it try and send back its own
complete response? If it does, what is the result it is providing? Can
you take out any secret bits and post it?

Also, what is the actual URL you are using when are making the
request that sends back multiple headers?

>          PythonOption site_name gethabbo
> </Directory>
> <Directory /home/gethabbo/public_html/editor>
>          AuthType Basic
>          AuthName "Questionable"
>          Require valid-user
> </Directory>
> 
> RewriteMap lowercase int:tolower
> RewriteMap vhost txt:/etc/apache2/vhost.map
> 
> # Use the dynamic virtual host map.
> RewriteCond %{REQUEST_URI} !^/icons/
> RewriteCond %{REQUEST_URI} !^/cgi-bin/
> RewriteCond %{REQUEST_URI} !^/mail/
> RewriteCond %{REQUEST_URI} !^/phpmyadmin/
> RewriteCond %{REQUEST_URI} !^/mt/
> RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
> RewriteCond ${vhost:%1} ^(/.*)$
> RewriteRule ^/(.*)$ %1/public_html/$1 [L]
> 
> And the relevant line in my map:
> www.gethabbo.com        /home/gethabbo


More information about the Mod_python mailing list