I concur with all comments made, you want to avoid having case insensitive URLs for the reasons stated.
On 15 June 2010 06:31, Deron Meranda <[email protected]> wrote: > On Mon, Jun 14, 2010 at 3:54 PM, Ben Timby <[email protected]> wrote: >>> http://mysite.com/login <-- works. >>> >>> How do I make it so "login" can be case in-sensitive? Login, LOGIN, >>> LoGiN ? > >> 1. Map / to your WSGI app, and then login/Login/LOGIN will all be handled by >> it. >> 2. Make apache case-insensitive? Perhaps: > > Or 3. Use multiple mappings for the expected common variants. > > WSGIScriptAlias /login /var/wsgi/login.wsgi > WSGIScriptAlias /Login /var/wsgi/login.wsgi > WSGIScriptAlias /LOGIN /var/wsgi/login.wsgi Just be a little bit careful with doing this. Normally mod_wsgi assigns a distinct Python sub interpreter within each process based on the mount point. >From memory though it will make URL mount point all lower case before calculating sub interpreter to use. Thus all the above should resolve to same sub interpreter. You may want to verify that by looking at value of 'mod_wsgi.application_group' in WSGI environ dictionary. To be safe, you can be explicit and add: WSGIApplicationGroup %{GLOBAL} which forces them to all use main interpreter. Graham > because, really, do you expect to see "LoGiN"? > > > However, you should consider whether you really do want case > insensitivity anyway. Some may argue that web resources should > have a single well-known canonical name. After all, URLs > and URIs are generally case-sensitive anyway (except for the > hostname portion, which because of historic DNS conventions > are case-insensitive). > > Also by having multiple case-variants for your URLs you may > be defeating web caching, spiders (for search engines), > and so forth. > > > If you want to allow for case insensitivity yet still have a single > canonical URL, you should really use redirects, > > Redirect permanent /Login /login > Redirect permanent /LOGIN /login > > -- > Deron Meranda > http://deron.meranda.us/ > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
