On 1 Feb 2013, at 9:13 AM, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote:
> I think you can do
> 
> routes_in = [('/((?i)my_data/?$anything','/my_data/$anything')]
> 
> (?i) is a directive that tells the regular expression parser to ignore the 
> case
> 
> On Thursday, 31 January 2013 09:27:48 UTC-6, olly....@sirocos.com wrote:
> I have a web2py application say, at "http://127.0.0.1:8000/my_data";.  I would 
> like to make the URL case insensitive so that any users calling My_data, 
> MY_Data, etc it gets remapped to the lowercase version of the URL.
> 
> Any thoughts on how to do this?
> 
> Olly
> 
> 

You could also edit request.controller, request.function, and request.args (if 
appropriate) in your model, if you're not using controller-specific models at 
least.

I could see adding a case-normalizing option to the parametric router.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to