CodeIgniter Forums

Full Version: Improve routes by no need to add anyting after /
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When we do routing like:

$route['admin/login'] = 'Admin';

will work by accessing

http://url/admin/login

But something like:

$route['admin/'] = 'Admin';

Then accessing by

http://url/admin/

Will show error404.

When we do

$route['admin'] = 'Admin';

We got what we want, we can access by

http://url/admin/

But not exactly.

Cuz we can access it too by 

http://url/admin

(without slash)

And we don't want it.


It would be great to just make route that allows only access by

http://url/admin/

and nothing else, no without slash or something else