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!

Basecamp: Project management software, online collaboration(doesn’t work)

Are we really the only ones that see this as a problem??
On Apr 22, 12:02 am, Ben J. [email protected]

On Jun 11, 2008, at 10:10 AM, Synth wrote:

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.

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 B. http://agileconsultingllc.com
[email protected]

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 P.
Software Engineer

sales(AT)railshouse(DOT)com

hi

you can write url redirection rule in .htaccess file. you can fine this
file in your rails application

path is like
-rails_app
-public
-.htaccess

rewrite rule like this

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/