rsanchez/mo_variables

FR: Setting to force lowercase site URLs

Closed this issue · 3 comments

A common issue with ExpressionEngine in shared hosting environments is conflicts between uppercase and lowercase (or mixed case) URLs. It would be great if Mo Variables included an option to force site URLs to lowercase and redirect with a 301 any URLs with uppercase or mixed case URLs.

This does not sound like the responsibility of Mo Variables. It just captures values from the URL, it shouldn't be modifying them or handling http redirects IMO. This sounds more like a different extension, or better yet, handle this at the server level. There are ways to do this with htaccess.

You may also be able to do a regex check on the {current_url} variable to see if it contains upper case letter, and if so use the {redirect=""} tag.

Agreed that this is out of the purview of Mo'. You could probably even do this at the web server level in htaccess/nginx.conf/web.config.