'Twas brillig, and Laurens van Vliet at 16/11/10 11:57 did gyre and gimble: > Problem with this code is that it is not working. > > When I try to open in my browser my application with /foo at the end of the > url, say for example: http://www.example.com/foo > then I get this error message: > Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with > message 'Invalid controller specified (foo)' > > Is it possible to use the RewriteRule without any FooController or Routes for > /foo?
Yes this is possible, you've just got the syntax wrong. "^foo" will match URLs *beginning* with foo, not ending with foo. Try, "foo$" to match all URLs ending with foo, or perhaps, "^/foo$" to match a URL of http://example.com/foo And make sure you put the L flag into the rewrite ([R=301,NC,L]) so that it does not then process the rest of the rules. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
