Hi, Is it possible to expose a directory within a rails app where the standard rails routing is not applied? ie example.com/ and example.com/foo would use the standard rails routes defined in routes.rb, but example.com/bar would return a standard non-rails-parsed directory listing similar to http://www.ibiblio.org/pub/. Is there some special :ignore flag I can set on select directories in routes.rb? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That wouldn''t be a rails setting... you''d need to configure your web server to not send requests for that path to rails at all. Then it''s just plain ol'' web-serving. I think most servers render directory listings if there is no "default" file in there (index.html, etc.). b Steve Hulet wrote:> > Hi, > > Is it possible to expose a directory within a rails app where the > standard rails routing is not applied? > > ie example.com/ and example.com/foo would use the standard rails routes > defined in routes.rb, but example.com/bar would return a standard > non-rails-parsed directory listing similar to > http://www.ibiblio.org/pub/. > > Is there some special :ignore flag I can set on select directories in > routes.rb? >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ben Munat wrote:> That wouldn''t be a rails setting... you''d need to configure your web... Of course! I open up public/.htaccess and there on line 5: # If you don''t want Rails to look in certain directories, # use the following rewrite rules so that Apache won''t rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] I''ve been looking in the wrong place this whole time. Thanks so much for the pointer. Steve Hulet -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---