hi i want to add a prefix to all urls in my project for example ,now i have like this "http://localhost:3000/posts" but i want like this "http://localhost:3000/my_blog/posts" "http://localhost:3000/my_blog/posts/new" "http://localhost:3000/my_blog/posts/edit/1" "http://localhost:3000/my_blog/*/*..." "my_blog" prefix should come all of my blog project link how to do that ? -- 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 -~----------~----~----~----~------~----~------~--~---
Hello Thani, Try something like this: map.resources :posts, :path_prefix => ''/my_blog'' Hope it helps, Elías On Nov 13, 11:07 am, Thani Ararsu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hi > i want to add a prefix to all urls in my project > > for example ,now i have like this > "http://localhost:3000/posts" > > but > i want like this > "http://localhost:3000/my_blog/posts" > "http://localhost:3000/my_blog/posts/new" > "http://localhost:3000/my_blog/posts/edit/1" > "http://localhost:3000/my_blog/*/*..." > > "my_blog" prefix should come all of my blog project link > > how to do that ? > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thani Ararsu wrote:> hi > i want to add a prefix to all urls in my project > > for example ,now i have like this > "http://localhost:3000/posts" > > > but > i want like this > "http://localhost:3000/my_blog/posts" > "http://localhost:3000/my_blog/posts/new" > "http://localhost:3000/my_blog/posts/edit/1" > "http://localhost:3000/my_blog/*/*..." > > > "my_blog" prefix should come all of my blog project link > > how to do that ? >If your using apache you might look into mod_rewrite. -- Jack Christensen jackc-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jack Christensen wrote:> If your using apache you might look into mod_rewrite. > > -- > Jack Christensen > jackc-/SOt/BrQZzMOf2zXYvRtkodd74u8MsAO@public.gmane.orgthanks all of you.. i am using apache how could i change mod_write -- 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 -~----------~----~----~----~------~----~------~--~---
Elias Orozco wrote:> Hello Thani, > > Try something like this: > > map.resources :posts, :path_prefix => ''/my_blog'' > > Hope it helps, > > El�as > > > > On Nov 13, 11:07�am, Thani Ararsu <rails-mailing-l...@andreas-s.net>if i want to use all of my roots then what should i do ? -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---