I'm trying to allow files of any extention to be re-written though symfony, for example:
/news/asset/3122/filename.gif
and
/news/asset/3122/filename.png
should match this route:
news_asset:
url: /news/asset/:news_id/:filename
param: { module: news, action: viewasset }
However, I use .html as a default file extension, and these files aren't
matching the routing rule.
I thought I'd use mod_rewrite to fix this problem, and used the
following rule:
RewriteCond %{REQUEST_URI} news/asset
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule ^(.*)$ $1.html [L]
This kinda works, it rewrites the URL and _SERVER[REDIRECT_URL] now
contains a correctly re-written URL, for example, this can be seen in
the debug toolbar:
REDIRECT_URL: /news/asset/3122/banner3.gif.html
However, sfRequeset doesn't look at the REDIRECT_URL, and only at
REQUEST_URI, so this doesn't work.
Does anyone have any suggestions on how to work around these problems?
--
Ian P. Christian ~ http://pookey.co.uk
signature.asc
Description: OpenPGP digital signature
