开发者

Rails Pages that don't exist resolving

开发者 https://www.devze.com 2023-01-28 03:42 出处:网络
I have a site that has pages like mysite.com/example.However is someone comes in and types mysite.com/example/random_bs than the page actually resolves instead of showing an error.How can I get the pa

I have a site that has pages like mysite.com/example. However is someone comes in and types mysite.com/example/random_bs than the page actually resolves instead of showing an error. How can I get the page to stop re开发者_如何学Gosolving and just show an error?

Rails 2.3.8

Thanks


I think 'map.connect "/:action", :controller => "home"' is your problem. Try

map.connect 'example', :controller => "home", :action => 'example'

or something like that. (Sorry my Rails 2.3 syntax is a little rusty.)

0

精彩评论

暂无评论...
验证码 换一张
取 消