durusmail: quixote-users: scgi vs apache redirection to localhost
scgi vs apache redirection to localhost
2004-09-23
2004-09-23
2004-09-23
scgi vs apache redirection to localhost
Karl N. Redman
2004-09-23
Hi. I'm having an interesting problem here that is driving me nuts. The
situation is that I have the quixote FIX_TRAILING_SLASH turned on and
when a redirection occurs to a relative, non-trailing-slashed, URI the
redirection points me to localhost. Let me just say that I've seen
several similar kinds of questions out there but this one seems
different to me.

I'll try to demonstrate:

______http.conf contains:
#the rewrite rule is redundant here
RewriteEngine On
RewriteRule ^/foo$ foo/ [R=permanent]


        SCGIServer 127.0.0.1 4000
        SCGIHandler On

_____

_____ my app handler for scgi looks like:
class MyAppHandler(QuixoteHandler):
    publisher_class = MyPublisher
    root_namespace = config.get('config', 'root_namespace')
    prefix = config.get('config', 'url_prefix')

    #where
    #root_namespace = "bar.UI"
    #prefix = "/foo"
_____

What I'm trying to do is use relative URLs (which works fine except that
quixote, i think, is redirecting me in a strange way).

a link that looks like 
yields a page served up as http://123.45.67.89/foo/works/

a link that looks like 
yields a page served up as http://localhost/foo/blecch/

Notice the end slashes here. Quixote is handling the second scenario's
URI and substituting 123.45.67.89 with localhost only when
FIX_TRAILING_SLASH is set to true and when it is actually required to
"fix the trailing slash" (actually it's giving it 127.0.0.1 but my hosts
resolution delivers it as localhost, of coarse).

Does this make any sense to anyone? Am I just really missing the boat on
something here? Any help would be appreciated. I have other ways to do
things (by just making sure that I use fully qualified URLs or the like)
but I would really like to know why this is happening.

Sincerely,
Karl N. Redman



reply