With this route:
map.connect ‘items/:subject/:id’,
:controller=>‘items’, :action=>‘show_redirect’,
:requirements => {:subject => /.+/, :id => /\d+/}
Is it possible to have it match these URLs:
items/biology/123
items/chemistry/234
items/math/456
But not these:
items/new
items/list
…
The problem is that :requirements only applies if that
param exists. I’d like to make it so that that route
only applies if all params do in fact exist. I’d do it
with redirects in Lighty, but I want to send 301
redirects and I’m not sure what code redirect.url
sends (probably 302).
Thanks for any help!
csn
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com