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 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 a

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

Re: Changing browser URL based on condition

2011-07-11 Thread Octavian Rasnita
From: Jerry Pereira online.je...@gmail.com 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

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 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

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

Re: Changing browser URL based on condition

2011-07-11 Thread Octavian Rasnita
From: Jerry Pereira online.je...@gmail.com 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

Re: Changing browser URL based on condition

2011-07-11 Thread MK
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

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

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 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

Re: Changing browser URL based on condition

2011-07-11 Thread Jerry Pereira
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

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, July 11,

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