[Zope] Problems with External Script
Ben Ocean
zope@thewebsons.com
Thu, 31 Jan 2002 11:45:46 -0800
At 12:58 PM 1/31/02 -0500, you wrote:
>You use the RESPONSE object. That is,
>def ....(REQUEST, RESPONSE):
>....
>location=...
>RESPONSE.redirect(location)
Okay, gotta be close by now :/
Here's my script:
import string
def myaffiliateprogram(REQUEST,RESPONSE):
user_id, banner_id, page =
REQUEST['user_id'],REQUEST['banner_id'],REQUEST['page']
redir =
"http://www.myaffiliateprogram.com/u/%(user_id)s/t.asp?id=%(banner_id)s&p=%(page)s"
% locals()
# location=RESPONSE.redirect("%(redir)s\n % locals()")
# location-RESPONSE.redirect("http://thewebsons.com")
# location=redirect("http://thewebsons.com")
location: redirect("http://thewebsons.com")
All of those options (including the ones commented out) return a bad server
request (Apache error #400).
>See http://www.zope.org/Members/michel/ZB/AppendixB.dtml
>for other things in repsonse.
This, unfortunately, had but 4 words on the subject, if I found the correct
reference.
Any more ideas?
TIA,
BenO