>
> map.connect '/modules.php?name=News&file=pdf&sid=87', :controller =>
> 'redirect'
>
> for the first rule (index.htm) the redirection woks fine, but on second
> rule the redirection don't success.
> what if the correct syntax i doing to use for my purpose?
>

map.connect '/modules.php', :controller => 'redirect'

The ? params are automatically extracted from the URL to the params hash in
Rails, leaving the URL being the part before the ?.

If you want to redirect only specific parameters on that URL, you'll have to
handle that within your RedirectController (or alternatively handle this
with a Rails metal that internally rewrites the URL and returns a 404 (to
bounce it up in to Rails)).

Cheers,


Andy

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to