Exposing directories in rails app

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
Index of /pub.

Is there some special :ignore flag I can set on select directories in
routes.rb?

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

Ben M. 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