Hi, How can I make my urls case-insensitive? And where can I put the code that can rewrite some of the routes that I have been using. (not all of them) i.e. I want all options after /blog/ be kept as is but all options after /comment/ will be downcased In short, all my urls except /blog/ will be downcased, blog will remain as is. I thought using an application controller method but couldnt be sure.. What do you recomennd? Thanks in advance. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi, Onur Turgay wrote:> In short, all my urls except /blog/ will be downcased, blog will remain > as is. > > I thought using an application controller method but couldnt be sure.. > What do you recomennd?I''m not sure of what you want to do. Try to use a catchall in your route: map.connect ''/blog/*bloguri'', :controller => ''blog'', :action => ''view'' and in your controller, use the bloguri array and change case as you want. -- Jean-Christophe Michel
what I wanted to mean was if someonw calls /COMMent/VIEW i want to redirect him/her to /comment/view if someone calls BLOG/BLALALAL i want to redirect him/her to blog/BLALALALA except for blog, all urls will be downcased.. On 11/9/05, Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/w@public.gmane.org> wrote:> > Hi, > > Onur Turgay wrote: > > In short, all my urls except /blog/ will be downcased, blog will remain > > as is. > > > > I thought using an application controller method but couldnt be sure.. > > What do you recomennd? > > I''m not sure of what you want to do. > Try to use a catchall in your route: > > map.connect ''/blog/*bloguri'', :controller => ''blog'', :action => ''view'' > > and in your controller, use the bloguri array and change case as you want. > -- > Jean-Christophe Michel > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Onur, Use apache mod_rewrite instead, it is much more easier and way more faster than RoR for this specific requirement... --- Onur Turgay <onurturgay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> what I wanted to mean was > > if someonw calls /COMMent/VIEW > i want to redirect him/her to /comment/view > > if someone calls BLOG/BLALALAL > i want to redirect him/her to blog/BLALALALA > > except for blog, all urls will be downcased.. > > > On 11/9/05, Jean-Christophe Michel > <jc.michel-/aRvmaKoZxNWk0Htik3J/w@public.gmane.org> wrote: > > > > Hi, > > > > Onur Turgay wrote: > > > In short, all my urls except /blog/ will be > downcased, blog will remain > > > as is. > > > > > > I thought using an application controller method > but couldnt be sure.. > > > What do you recomennd? > > > > I''m not sure of what you want to do. > > Try to use a catchall in your route: > > > > map.connect ''/blog/*bloguri'', :controller => > ''blog'', :action => ''view'' > > > > and in your controller, use the bloguri array and > change case as you want. > > -- > > Jean-Christophe Michel > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >__________________________________ Yahoo! Mail - PC Magazine Editors'' Choice 2005 http://mail.yahoo.com
is there an equivalent in lighttpd? On 11/9/05, Cabbar Duzayak <dcabbar-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > Onur, > > Use apache mod_rewrite instead, it is much more easier > and way more faster than RoR for this specific > requirement... > > --- Onur Turgay <onurturgay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > what I wanted to mean was > > > > if someonw calls /COMMent/VIEW > > i want to redirect him/her to /comment/view > > > > if someone calls BLOG/BLALALAL > > i want to redirect him/her to blog/BLALALALA > > > > except for blog, all urls will be downcased.. > > > > > > On 11/9/05, Jean-Christophe Michel > > <jc.michel-/aRvmaKoZxNWk0Htik3J/w@public.gmane.org> wrote: > > > > > > Hi, > > > > > > Onur Turgay wrote: > > > > In short, all my urls except /blog/ will be > > downcased, blog will remain > > > > as is. > > > > > > > > I thought using an application controller method > > but couldnt be sure.. > > > > What do you recomennd? > > > > > > I''m not sure of what you want to do. > > > Try to use a catchall in your route: > > > > > > map.connect ''/blog/*bloguri'', :controller => > > ''blog'', :action => ''view'' > > > > > > and in your controller, use the bloguri array and > > change case as you want. > > > -- > > > Jean-Christophe Michel > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors'' Choice 2005 > http://mail.yahoo.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails