I am currently trying to mimic folder/files behavior in rails with category/articles schema. So, I have this in routes :
match '/:category/' => 'category#list_articles'
match '/:category/:article.:format' => 'article#show'
Basically, request urls are :
http://www.example.com/category/
http://www.example.com/category/article.html
Everything works. The problem is it's working to well. An url like http://www.example.com/category
(without the trailing slash) serves also the list of articles. Does it exist an a way either to block this with a 404 or better to redirect to the category with the trailing slash ?
Using Rails 3, nginx, ruby 1.9.2. Thanks!