News Feed
Sections




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

PHPMaster.com:
Web Routing in PHP with Aura.Router
June 18, 2012 @ 08:19:16

On PHPMaster.com today there's a new tutorial showing how to route your web requests with the Aura.Router component from the AuraPHP component framework.

Everyone is interested in SEO-friendly, REST-style URLs. Apache can do URL routing via mod_rewrite rules, but it's hard and error prone. Why not use PHP itself to handle routing instead? Aura is a independent collection of libraries for PHP 5.4 brought to you by Paul M Jones. Here we are going to introduce you Aura.Router. Aura.Router is a simple and easy web routing library for PHP. In this article you will learn how to create routes which are SEO-friendly, REST-style URLs with the help of PHP.

He walks you through the download and install of the Aura.Router component (separate from the framework) and how to set up the mod_rewrite rules to work with it and a front controller. He includes some code for a basic usage, showing the mapping of a default route and more complex routes with named parameters. He also shows how to use the "match" method to find the route that was matched and how to dispatch/hand off the routing to a controller.

0 comments voice your opinion now!
aura router component tutorial routing framework


blog comments powered by Disqus

Similar Posts

SaniSoft Blog: Bugs & enhancements for Auth component in CakePHP v1.2 - Part 1

DevShed: PHP 5 Helpers: Calling Methods Out of Object Scope

php|architect: Using PHP5's SOAP Support

Alexander Netkachev's Blog: Practical PHP events: The Java way

Sanisoft Blog: Radio button issues while migrating from cakePHP-1.2alpha app to 1.2prebeta


Community Events





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


deployment introduction symfony package tips unittest framework api release install library podcast interview opinion community language laravel series zendserver update

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