title: How to do 301 redirect in rails routes if parameter in upper case?
body: <p>How can I do 301 redirect in routes.rb based on a condition that if certain parameter is in upper case thn redirect to lower case URL.</p>
  
  <p>I know i can make URLs case insensitive but thats not what I want.</p>
  
  <p>for example if users hits this URL
  /Company/XYZ or /company/Xyz</p>
  
  <p>he should be redirected to 
  /company/xyz</p>
  
  <p>Is this even possible with 301 redirects or do I have to use 302 redirects.</p>
  
  <p>Thanks</p>