Chapter 5. Zend_Controller_RewriteRouter
Table of Contents
5.1. Introduction
5.2. Using a router
5.3. Basic Routes
5.4. Variable defaults
5.5. Variable requirements
5.6. Base URL and subdirectories
5.7. Default routes
5.1. Introduction
Zend_Controller_RewriteRouter is a new version of the framework router. Routing is the process of taking a URI endpoint and decomposing it to determine which controller and action of that controller, should receive the request. This definition of controller, action and optional parameters is packaged into a value object called Zend_Controller_Dispatcher_Token which is then processed by Zend_Controller_Dispatcher. Routing occurs only once: when the request is initially received and before the first controller is dispatched.
Zend_Controller_RewriteRouter is designed to allow for mod_rewrite like functionality using pure php structures. It is very loosely based on Ruby on Rails routing and does not require any prior knowledge of webserver URL rewriting. It is designed to work with a single mod_rewrite rule (one of):
2 Comments
comments.show.hideSep 15, 2006
Nick Lo
Here I could add a useful comment about the mod_rewrite settings that was brought up on the mailing list.
Jan 31, 2007
Nayana Hettiarachchi
I tried using
RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
and it kept telling me back request, but i modified it so that it reads
RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
version information
Apache/2.0.55