how can I create a conditional route that work for the following:
http://site.com/1vcs1YUf1Z
Where 1vcs1YUf1Z is a UID.
Is there a way I can add a routing option to the end of my route file that says if the following condition is met (10 characters trailing the first / and that's it) then to route to the following and pass that as the UID?
Thanks
get 'projects/:uid' => 'controller#action',
:constraints => { :uid => /^[0-9a-z]{10}$/i }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With