Rails routes case sensitive?

If I have a route

map.connect '/test', :controller => "test", :action => "test

localhost:3000/test (works)
localhost:3000/TEST (doesn't work)

How do I get both to work?

Thanks for your help.

I’m definitely having this problem as well. Indeed, basecamp’s
website has this issue too!
http://basecamphq.com/tour(works)
http://basecamphq.com/Tour(doesn’t work)

Are we really the only ones that see this as a problem??

URLs are case-sensitive (except for the host name which is not). If you want to recognize both /test and /TEST, define a new route:

   map.connect '/TEST', :controller => 'test', :action => 'test'

You may think that because some servers do not have case-sensitive file systems and will serve up the same file regardless of case, you should find this behavior everywhere. By design, this is not the case.

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

Hi

URL is always case sensitive except for the domain names just as Rob
rightly said.

But there is a method by which u can make both of them work.....u can
define a rewrite rule in .htaccess which will convert all ur urls from
capital to small letter

something like s/[A-Z]/[a-z]/g

hope this helps

Dhaval Parikh
Software Engineer
www.railshouse.com
sales(AT)railshouse(DOT)com