[mod_python] Sugestion about publisher

Rich Salz rsalz at caveosystems.com
Fri Jan 5 20:28:09 EST 2001


> > > +        loc = 'http://' + _req.connection.server.server_hostname
> >                   ^^^^^^^^^^
> >               should get it out of the uri, since it might be https
> 
> I can't see where from in mod_python to get this ?!?

Perhaps easiest to leave out the protocol, host, and port altogether.
Won't that work?  loc = _req.uri + /index_html ?

> Well, my Apache returns MOVED_PERMANENTLY for directories, I tried it with:

I must have old information, or an old server -- ncsa code. :)  Thanks.

> One question, should I use req.hostname or
> req.connection.server.server_hostname? (it may be diferent)

If you can't just omit it, then I think you want the second choice, but I'm
not 
very knowledgeable about virtual hosting.
	/r$



More information about the Mod_python mailing list