[Zope-dev] __before_publishing_traverse__ calls RESPONSE.redirect(): is there another way to change the browser URL?

Florent Guillaume fg@nuxeo.com
Fri, 27 Sep 2002 17:03:18 +0000 (UTC)


Craeg K Strong  <cstrong@arielpartners.com> wrote:
> However, I would like to distinguish between two cases:
> 
> a) Direct Navigation:   e.g.I am a user and I just typed in
> 
> http://acme.com/myapp/contracts/TRW-001/taskorders/TO-01/invoices/DSDC-001-9301
> 
> into my browser
> 
> b) Application-Controlled:   e.g. I am the application, I did some processing
> based on a button the user pressed in some form somewhere and determined
> that the next URL should be
> 
> http://acme.com/myapp/contracts/TRW-001/taskorders/TO-01/invoices/DSDC-001-9301
> 
> ====Now here is the issue====
> 
> In both cases above, the REQUEST object looks identical.   Is there any way
> that I can distinguish a GET that is the result of a REDIRECT from one that
> is not?
> 
> I would think this would be of interest to others.  For example, if I move my
> web page and put a redirect from the old address, I could track how many
> people came to my web page directly versus those that are still using the
> old address and are getting redirected.

You could try to do a POST and distinguish that from the GET when the
user just types the URL. But it's probably better to add a special
hidden field in your form to distinguish the two.

Florent




-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com