On Sep 3, 8:34 am, gunnarlium <[EMAIL PROTECTED]> wrote:

> I have a url like "/music/tags/mr.music". "mr.music" should be
> accessible from $requst->getParameter('tags').
>
> Instead, I get a 404 error. I assume this is because the rewriting
> rules by default makes any url containing periods bypass symfony, and
> tries to access the file mr.music in the music/tags directory (which
> does not exist).
>
> Can anyone help me with the right rewrite conditions for this kind of
> problem, or some other solid workaround?
>
> Current settings, for reference:
> <IfModule mod_rewrite.c>
>   RewriteEngine On
>
>   # uncomment the following line, if you are having trouble
>   # getting no_script_name to work
>   #RewriteBase /
>
>   # we skip all files with .something
>   RewriteCond %{REQUEST_URI} \..+$
>   RewriteCond %{REQUEST_URI} !\.html$
>   RewriteCond %{REQUEST_URI} !sitemap\.xml$
>   RewriteRule .* - [L]

The stanza above, passes through an ".something" file (except .html or
sitemap.xml) through to Apache instead of the symfony controller
producing the 404 error you see.

I imagine you would have to rewrite that stanza and explicitly specify
which files you allow and let the rest "fall through" to the following
rules (where eventually it will be handed off to your controller).
This means for example, adding rewrite conditions
for .css, .js, .gif, .jpg, .swf files, etc etc.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to