News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michael Nitschinger's Blog:
Quick Tip Lithium Redirect
September 16, 2011 @ 10:02:21

Michael Nitschinger has a "quick tip" posted in this new entry to his blog - how to handle a redirect in a Lithium-framework based application.

While migrating pastium over to MongoDB (from CouchDB), I found [a] snippet in the routes.php file [that makes it so] when the user enters the application via the root url (/), he instantly gets redirected to /pastes/add (or a different URL if you have custom routes configured). This may seem ok at first, but there's a problem. It doesn't take URLs into account that don't live directly under the document root.

The snippet he references and others showing how to correct the issue are included - replacing the location array controller/action information with the static class information for the route in a match() call. For more information on the routing in Lithium, see these manual pages.

0 comments voice your opinion now!
lithium framework tip redirect method


blog comments powered by Disqus

Similar Posts

DZone.com: Video: PHP 5.3.1, MongoDB and Lithium on Windows 7 / IIS 7

The Bakery: 10 New CakePHP Articles, Tutorials and Helpers

Chris Hartjes' Blog: CakePHP + Nginx Configuration Update

Zend Developer Zone: Announcing the December 2010 Zend Framework Bug-Hunt

Mike Naberezny's Blog: My First php|architect Article (Zend Framework)


Community Events





Don't see your event here?
Let us know!


configure introduction laravel release extension unittest tool series podcast interview symfony opinion community list voicesoftheelephpant threedevsandamaybe conference composer framework api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework