I see code like this used in examples: config.gem 'rack-rewrite', '~> 1.0.0' require 'rack/rewrite' config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do rewrite '/wiki/John_Trupiano', '/john' r301 '/wiki/Yair_Flicker', '/yair' r302 '/wiki/Greg_Jastrab', '/greg' r301 %r{/wiki/(\w+)_\w+}, '/$1' end
Where does this code go? How can I make this apply to a whole group? For example instead of only making tutorials/61 go to the proper URL, making anything that is just "/tutorials/SOMETHING" go to the proper URL? Please Help, Thanks In Advance, -Joe On 23 June, 10:21, Lecky <lecky...@gmail.com> wrote: > Try gem rack-rewrite, that can solve your problem. > > Cheers, > Lecky > > On Jun 23, 6:16 am, Joe <j...@dev-hq.co.uk> wrote: > > > Bump?! Can anyone help with this? > > > On 21 June, 17:11, Joe <j...@dev-hq.co.uk> wrote: > > > > Im currently in the process of adding permalinking to my site; at the > > > moment I am simply testing it out in development mode. > > > > The problem is that at the moment I have all of these URLs that lead > > > to the same content: > > > >http://127.0.0.1:3000/categories/1-css/tutorials/12-test9http://127.0... > > > > What I'm trying to acheive is to get all of these URLs to redirect to > > > the top one so that google won't think I've got duplicate content. > > > > Please Help, > > > > If you need any more information feel free to ask, > > > > Thanks In Advance, > > > > -Joe -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.