Nicolas Cavigneaux
2005-May-19 18:53 UTC
How do I have invalid requests redirect to 404 page ?
Hi there, I''ve got a problem with invalid paths. For example if I try http://mysite.org/dsqdsd (dsqdsd is not an existing controller, or an existing page in public directory), I have an error page rather than the 404 page. The error page is : Routing Error No route for path: "dsdqs" Failure reasons: 1. <ActionController::Routing::Route "" when {:action=>"list", :controller=>"recipe"}> failed because unused components were left: dsdqs 2. <ActionController::Routing::Route ":controller/service.wsdl" when {:action=>"wsdl"}> failed because no controller found at subpath dsdqs 3. <ActionController::Routing::Route ":controller/:action/:id" || {:id=>nil, :action=>"index"}> failed because no controller found at subpath dsdqs -- Nicolas Cavigneaux | GPG KeyID : CFE76D24 nico-DRabjd/C3MEdnm+yROfE0A@public.gmane.org | http://www.bounga.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Nicolas Cavigneaux
2005-May-19 18:56 UTC
Re: How do I have invalid requests redirect to 404 page ?
Le jeudi 19 mai 2005 à 20:53 +0200, Nicolas Cavigneaux a écrit :> Hi there, > > I''ve got a problem with invalid paths. > > For example if I try http://mysite.org/dsqdsd (dsqdsd is not an existing > controller, or an existing page in public directory), I have an error > page rather than the 404 page. > > The error page is : > Routing Error > No route for path: "dsdqs" > > Failure reasons: > 1. <ActionController::Routing::Route "" when > {:action=>"list", :controller=>"recipe"}> failed because unused > components were left: dsdqs > 2. <ActionController::Routing::Route ":controller/service.wsdl" > when {:action=>"wsdl"}> failed because no controller found at > subpath dsdqs > 3. <ActionController::Routing::Route ":controller/:action/:id" || > {:id=>nil, :action=>"index"}> failed because no controller found > at subpath dsdqsHum there''s a piece of my mail missing ... So I want that if a controller is not found Rails prints my 404 page. I''m using apache. And I think there''s nothing special with my config. Thank you for your help. -- Nicolas Cavigneaux | GPG KeyID : CFE76D24 nico-DRabjd/C3MEdnm+yROfE0A@public.gmane.org | http://www.bounga.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Nicolas Cavigneaux
2005-May-19 19:17 UTC
Re: How do I have invalid requests redirect to 404 page ?
Le jeudi 19 mai 2005 à 21:07 -0700, Robert Mannl a écrit :> You''re running rails in development mode. > > As soon as you run it in production mode it''ll show the regular 404 page.Oh great ! Sorry for the stupid question. Bye. -- Nicolas Cavigneaux | GPG KeyID : CFE76D24 nico-DRabjd/C3MEdnm+yROfE0A@public.gmane.org | http://www.bounga.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Robert Mannl
2005-May-20 04:07 UTC
Re: How do I have invalid requests redirect to 404 page ?
You''re running rails in development mode. As soon as you run it in production mode it''ll show the regular 404 page.>Le jeudi 19 mai 2005 à 20:53 +0200, Nicolas Cavigneaux a écrit : > > >>Hi there, >> >>I''ve got a problem with invalid paths. >> >>For example if I try http://mysite.org/dsqdsd (dsqdsd is not an existing >>controller, or an existing page in public directory), I have an error >>page rather than the 404 page. >> >>The error page is : >>Routing Error >>No route for path: "dsdqs" >> >>Failure reasons: >> 1. <ActionController::Routing::Route "" when >> {:action=>"list", :controller=>"recipe"}> failed because unused >> components were left: dsdqs >> 2. <ActionController::Routing::Route ":controller/service.wsdl" >> when {:action=>"wsdl"}> failed because no controller found at >> subpath dsdqs >> 3. <ActionController::Routing::Route ":controller/:action/:id" || >> {:id=>nil, :action=>"index"}> failed because no controller found >> at subpath dsdqs >> >> > >Hum there''s a piece of my mail missing ... > >So I want that if a controller is not found Rails prints my 404 page. > >I''m using apache. And I think there''s nothing special with my config. > >Thank you for your help. > > >------------------------------------------------------------------------ > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >