Thanks Guys!!! I will go ahead with Redirect approach. I was more interested
in building a generic framework for my application that would handle such
scenarios (login was just one of them).

On Mon, Jul 11, 2011 at 12:42 PM, Szekeres, Edward <
edward.szeke...@perkinelmer.com> wrote:

> It seems to be just an attempt to do what is already done in
> Apache2::AuthCookie (CPAN), which encapsulates a server side authentication.
>
>
> -----Original Message-----
> From: MK [mailto:m...@cognitivedissonance.ca]
> Sent: Monday, July 11, 2011 3:37 PM
> To: modperl@perl.apache.org
> Subject: Re: Changing browser URL based on condition
>
> On Mon, 11 Jul 2011 11:48:09 -0700
> Jerry Pereira <online.je...@gmail.com> wrote:
> > 1. User types the URL - www.example.com, this will display the login
> > page.
> > 2. Once the user enters the credentials and hits submit, the request
> > is posted to www.example.com/login action.
> > 3. If the credentials entered by the user is valid then i would like
> > to show the home page..uri
> > 4. I am able to show the homw page, but the URL does not change to
> > www.example.com/home, instead it remains the same (i.e.
> > www.example.com/login).
>
> One important reason to do something like that is because you do not
> want the user to bookmark or otherwise pass on an url with completely
> ambiguous content -- /login should refer to the login page, /home should
> refer to the home page, they are two different things.  Having /login
> refer to both is no good. So I think your desire is justified.
>
> IMO, this is best handled client-side: you return your login data via
> an AJAX call.  If the login succeeds, the client loads /home.  If the
> login has failed, the client displays a message to that effect.   You
> need to prevent spoofed access to /home, but of course you have to do
> that anyway (via cookies or whatever method you are already using).
>
> --
> "Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
> "The angel of history[...]is turned toward the past." (Walter Benjamin)
>
>


-- 
Your clothes may be the latest in style but you aint completely dressed
until you wear a smile!
Keep smiling : )

Reply via email to