Do I have to setup some sort of .htaccess file? right now I have ruby setup with a small demo app called: "say" If you browse to the url: http://www.myurl.com/ruby_test/ you see the whole directory contents, you can see what''s in the controllers, etc. I don''t want that to happen. Additionally, if you HAVE to browse to the public folder in the demo app just execute the pages such as: /public/say/hello/. I want it work like a normal directory and if you type in the url: url.com/ruby_test/ say/hello it should work. Do I need a .htaccess file to do this? What are remedies around this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
DigitalWarfare-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-20 21:55 UTC
Re: Ruby path?
For anyone curious on how this can be done, it requires two edits! One add .htaccess file with (this goes in the directory above public: RewriteEngine On RewriteRule ^public/(.*)$ - [L] RewriteRule ^(.*)$ public/$1 [L,QSA] Next edit config/environment.rb: Add this to the end: ActionController::AbstractRequest.relative_url_root = "/ rails_app_directory_name_here" On Feb 19, 10:20 pm, "DigitalWarf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <DigitalWarf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Do I have to setup some sort of .htaccess file? > > right now I haverubysetup with a small demo app called: "say" > > If you browse to the url:http://www.myurl.com/ruby_test/you see the > whole directory contents, you can see what''s in the controllers, etc. > I don''t want that to happen. > > Additionally, if you HAVE to browse to the public folder in the demo > app just execute the pages such as: /public/say/hello/. I want it work > like a normal directory and if you type in the url: url.com/ruby_test/ > say/hello it should work. Do I need a .htaccess file to do this? What > are remedies around this?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---