Welcome Guest, Not a member yet? Register   Sign In
Tutorial, News, Case sensitive
#4

You can make the route for news case-insensitive, but you have to use a RegEx. For example, you could use:
PHP Code:
$route['(?i)(news)'] = 'news'

but you'd have to add additional routes for the supported segments to maintain that case-insensitivity for news/firstpost, news/view/firstpost, etc.

Honestly, with over 100 potential 1st segments for the URLs on my website, I only have one route setup like this, and I didn't bother with setting up the additional segments after I pointed out to the person who complained that they couldn't do this with URLs that they had spelled a word incorrectly in addition to putting capital letters where they didn't belong.

Despite our desire to have easy-to-read URLs (which also happen to be SEO-friendly), most people never input URLs manually, so this rarely matters. In my opinion, though, it's better to be consistent than permissive with URLs.
Reply


Messages In This Thread
Tutorial, News, Case sensitive - by woid - 09-05-2015, 06:41 AM
RE: Tutorial, News, Case sensitive - by PaulD - 09-08-2015, 02:55 AM
RE: Tutorial, News, Case sensitive - by kenjis - 09-08-2015, 10:20 PM
RE: Tutorial, News, Case sensitive - by mwhitney - 09-09-2015, 06:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB