Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 598E96993 for ; Wed, 27 Jul 2011 11:12:27 +0000 (UTC) Received: (qmail 13100 invoked by uid 500); 27 Jul 2011 11:12:26 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 12743 invoked by uid 500); 27 Jul 2011 11:12:22 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 12727 invoked by uid 99); 27 Jul 2011 11:12:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2011 11:12:22 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [151.193.120.22] (HELO sglonmg01-out.sabre.com) (151.193.120.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2011 11:12:17 +0000 X-ExtLoop1: From 10.136.74.7 X-IronPort-AV: E=Sophos;i="4.67,276,1309734000"; d="scan'208";a="3209813" Received: from unknown (HELO SGLONMHP001.Global.ad.sabre.com) ([10.136.74.7]) by sglonmg01-out.sabre.com with ESMTP/TLS/AES128-SHA; 27 Jul 2011 12:11:53 +0100 Received: from [10.135.200.225] (10.135.200.225) by SGLONMHP001.Global.ad.sabre.com (10.136.74.7) with Microsoft SMTP Server (TLS) id 8.3.137.0; Wed, 27 Jul 2011 12:12:22 +0100 Message-ID: <4E2FF278.6090701@travelocitynordic.com> Date: Wed, 27 Jul 2011 13:11:52 +0200 From: =?ISO-8859-1?Q?M=E5rten_Svantesson?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Subject: Re: Changing browser URL based on condition References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit 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 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 ). I am using Template toolkit to render my pages. I > tried $req->url('/home'), but that does not change the browser URI. > > Any help will be appreciated. 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. One starting point could be this: http://stackoverflow.com/questions/4015613/good-tutorial-for-using-html5-history-api-pushstate -- M�rten Svantesson Senior Developer Travelocity Nordic +46 (0)8 505 787 23