[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] [RaQ 3] Scripting problem
- Subject: Re: [cobalt-users] [RaQ 3] Scripting problem
- From: flash22@xxxxxxx
- Date: Tue May 1 08:53:01 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Tue, 1 May 2001, Joe Quinn wrote:
> Could anyone please assist? A new customer has transferred his site to us.
> It was working previously.
>
> None-the-less, short on any other clues, I changed it
> by adding the "www." so that it read:
> http://www.bestprac.org/cgi-bin/clickgo.pl
>
> It worked !!!
This is normal behaviour for the Raq's, and other servers besides, there
is an apache rule to add the 'www' to the domain name if the user hits the
site without it. By using a url without it in the script, he was causing
a double redirect in the same session and confused the browser...
eg: the script said redirect to bestprac.org/somewhere , but the server
got that and redirected it again to www.bestprac.org , that's more than
the browser can handle without loosing the original page name...
You can disable this via a slight edit of the server config if you want...
Using the www prefix was probably the 'right' thing to do, since it's the
real sitename....Ideally, the script should be working this out itself
based on information the server already gave it, or perhaps the domain
name shouldn't be in the script at all...(it is required for the redirect,
but scripts are supposed to work it out from the server context,
hardwiring it is kind of evil;)
ps: part of why the 'www' redirect is a 'good' thing is it wall cause you
no end of problems when doing a secure site if the domain name dowsn't
match exactlly, and browser users are lazy ;)
gsh