Re: Changing browser URL based on condition

2011-07-28 Thread Randolf Richardson
[sNip] > Telling the browser to fudge the URL is a client side thing. There is support > for this in HTML5, with varying support in different browsers. [sNip] I really hope the hostname portion is excluded from this; if not, then the world will be hit by a whole new set of scams. =(

Re: Changing browser URL based on condition

2011-07-27 Thread Mårten Svantesson
2011-07-11 20:48, Jerry Pereira wrote: Hi All, I would like to know if there is a way to change the URL displayed on browser without using Redirect option. The URL visible on client browser must be based on some condition that is evaluated in my mod_perl handler. For example - 1. User types

Re: Changing browser URL based on condition

2011-07-11 Thread Octavian Rasnita
From: Jerry Pereira 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). Then, as somebody suggested, start using Catalyst framework. It will handle

RE: Changing browser URL based on condition

2011-07-11 Thread James B. Muir
I think you need to do a redirect. From within your mod_perl handler try something like this: $r->content_type("text/plain"); $r->headers_out->set(Location=>$url); return Apache2::Const::HTTP_TEMPORARY_REDIRECT; From: Jerry Pereira [mailto:online.je...@gmail.com] Sent: Monday, Jul

Re: Changing browser URL based on condition

2011-07-11 Thread Jerry Pereira
@perl.apache.org > Subject: Re: Changing browser URL based on condition > > On Mon, 11 Jul 2011 11:48:09 -0700 > Jerry Pereira wrote: > > 1. User types the URL - www.example.com, this will display the login > > page. > > 2. Once the user enters the credentials and hits submi

Re: Changing browser URL based on condition

2011-07-11 Thread André Warnier
Szekeres, Edward wrote: It seems to be just an attempt to do what is already done in Apache2::AuthCookie (CPAN), which encapsulates a server side authentication. +1 Exactly. And I would add that before you start trying to implement you own authentication logic, you should really think twice.

RE: Changing browser URL based on condition

2011-07-11 Thread Szekeres, Edward
: Changing browser URL based on condition On Mon, 11 Jul 2011 11:48:09 -0700 Jerry Pereira 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.

Re: Changing browser URL based on condition

2011-07-11 Thread Brad Van Sickle
Agree with the consensus. The URI should be descriptive of the function, so any requests to /login should be from users who are attempting to... login. The home page should be housed under a separate URL (/home for example) After the user has authenticated, the login module should redirect

Re: Changing browser URL based on condition

2011-07-11 Thread MK
On Mon, 11 Jul 2011 11:48:09 -0700 Jerry Pereira 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

Re: Changing browser URL based on condition

2011-07-11 Thread Octavian Rasnita
From: "Jerry Pereira" Hi Edward, I have the following design: A single PerlResponseHandler for all requests. This handler based on the path decides the action to be taken For example, if the user submits to www.example.com/login, then the handler delegates the request to authentication module,

Re: Changing browser URL based on condition

2011-07-11 Thread Douglas Sims
Much better to go with a more RESTful approach - the URL is the identifier for the page and you don't want that identifier to represent the wrong page, e.g. if example.com/login sometimes returns the home page and sometimes returns some other page (assuming you can login from and return to multiple

Re: Changing browser URL based on condition

2011-07-11 Thread Michael Peters
On 07/11/2011 03:14 PM, Jerry Pereira wrote: Any suggestions to handle this scenario will be great. As others have noted, there isn't a way to do this. If it's a requirement of your application then the only way to handle it is to do redirection. And as others have pointed out it's a good ide

Re: Changing browser URL based on condition

2011-07-11 Thread Jerry Pereira
Hi Edward, I have the following design: A single PerlResponseHandler for all requests. This handler based on the path decides the action to be taken For example, if the user submits to www.example.com/login, then the handler delegates the request to authentication module, which will then either

Re: Changing browser URL based on condition

2011-07-11 Thread Octavian Rasnita
From: "Jerry Pereira" > Hi All, > > I would like to know if there is a way to change the URL displayed on > browser without using Redirect option. Nope, not possible. You need to do that redirection somehow. What the user sees in the address bar is the URL accessed by the browser. If the bro

RE: Changing browser URL based on condition

2011-07-11 Thread Szekeres, Edward
If you are looking to do this for "cosmetic reasons", I do this be simply using frame sets and doing redirects in the child frame. The URL displayed in the location bar will always be constant for the parent frame. I don't think there is any way to do this at the core level or it would be a sp

Re: Changing browser URL based on condition

2011-07-11 Thread Ronald J Kimball
On Mon, Jul 11, 2011 at 11:48:09AM -0700, Jerry Pereira wrote: > I would like to know if there is a way to change the URL displayed on > browser without using Redirect option. The URL visible on client browser > must be based on some condition that is evaluated in my mod_perl handler. Imagine if