The rewrite rule looks correct. Have you tried disabling the rewrite rules
to see if the file can be downloaded at all? If you get a 404 then you know
the file name is either incorrect or it's in the wrong folder (make sure
it's in public/).

--
Hector


On Sat, Jan 9, 2010 at 7:23 PM, engenius <[email protected]> wrote:

>
> I have a controller and action named counseling and admissions-guide
> respectively and I also have a file named admissions-guide.pdf in a folder
> labeled counseling.
>
> The problem is that the url
> http://www.example.com/counseling/admissions-guide should be handled by
> the
> Zend Router and http://www.example.com/counseling/admissions-guide.pdf
> should go to the file but both urls go straight to the file.
>
> I am using the rewrite rules from the Zend Reference Guide:
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} -s [OR]
> RewriteCond %{REQUEST_FILENAME} -l [OR]
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^.*$ - [NC,L]
> RewriteRule ^.*$ index.php [NC,L]
>
> I thought the first RewriteCond was supposed to check if a file exists but
> it seems to be ignoring the file extension.
>
> Has anyone else experienced this problem or have any ideas how to fix it?
> Please don't say rename the file. I really can't do that.
>
> Thanks.
> --
> View this message in context:
> http://n4.nabble.com/Problem-when-the-path-and-filename-is-the-same-as-the-controller-and-action-tp1010557p1010557.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>

Reply via email to