Case insensitive urls OR url re-writing

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.

Hi,

Onur T. 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.

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…

Onur,

Use apache mod_rewrite instead, it is much more easier
and way more faster than RoR for this specific
requirement…

— Onur T. [email protected] wrote:

I thought using an application controller method
change case as you want.
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Yahoo! Mail - PC Magazine Editors’ Choice 2005

IOnur T. wrote:

is there an equivalent in lighttpd?

It’s even called the same thing:
http://www.lighttpd.net/documentation/rewrite.html

is there an equivalent in lighttpd?