[Zope] Netscape 4.7x Redirect problem

Peter Bengtsson mail@peterbe.com
Fri, 31 Aug 2001 17:41:36 +0200


Can you not use the absolute_url() method?
It takes SiteRoots into account which no other good solution does.
If you have access too "Allen" in the aquisition path, you should definitly
use abolsute_url()

RESPONSE.redirect(Allen.menu.absolute_url())


> I changed the redirects from just the file or folder name:
> RESPONSE.redirect('/Allen/menu')
>
> And added the full server name. Works fine in Netscape now. Thanks!!
>
> I was going to add like this:
> RESPONSE.redirect(SERVER_NAME+'/Allen/menu')
> Then I don't have to change things when moving from development to
> production.
>
> But, it give the real name of the computer server and not the Zope domain
> name.
> Any ideas there? Or just leave it alone? Its not used in but a handful of
> places.
> Zope Find works great for tracking the locations too, so its not really a
> big deal.
>
> Thanks to all for the tips.
>
> Allen
>
> -----Original Message-----
> From: Behrens Matt - Grand Rapids [mailto:Matt.Behrens@Kohler.Com]
> Sent: Friday, August 31, 2001 8:47 AM
> To: Peter Bengtsson
> Cc: Schmidt, Allen J.; zope@zope.org
> Subject: Re: [Zope] Netscape 4.7x Redirect problem
>
>
> Peter Bengtsson wrote:
>
> > Don't ask me why but people in the community keep repeating that you
> should
> > pass a full url to the redirect() method.
> > Do instead:
> > RESPONSE.redirect('http://www.guugle.com/Allen/menu')
> > ...or...
> > RESPONSE.redirect(menu.absolute_url())
>
> This is because HTTP specifies that Location must give an absolute URI
> (<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30>), and
> redirect uses a 302 response and the Location field.