-- debussy007 <[email protected]> wrote
(on Thursday, 05 March 2009, 05:42 AM -0800):
> I have a file directory, which contains .html pages, which should be
> accessed without passing by MVC model Controller/Action.
>
> The url looks like this:
> http://xyz.com/public/miv/files/reports/histo-report-2009-03-05.html
>
> Currently I have the following exception with the URL above:
> Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with
> message 'Invalid controller specified (files)'
>
> I tried to asdd a rule in .htaccess,
> but it doesn't resolve the problem, maybe I did something wrong ...
>
> RewriteEngine on
> RewriteCond %{REQUEST_URI} !files/*
> RewriteRule .* index.php
> php_flag magic_quotes_gpc off
> php_flag register_globals off
Please use the recommended RewriteRules from the manual:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
This rule basically says that if the file exists on the server, serve
it; otherwise, go to the MVC.
--
Matthew Weier O'Phinney
Software Architect | [email protected]
Zend Framework | http://framework.zend.com/