Tuesday, 20 August 2013

Shorten URLs within CodeIgniter

Shorten URLs within CodeIgniter

This question has been asked a few times but I can't seem to find a
solution that helps me which is why I am trying here.
I have my site setup with the following for URLs I am using CodeIgniter I
have a controller called user which loads a user view.
So my URLs are structured as follows:
http://example.com/user/#/username
I want to try and strip out the user controller from the URL to tidy up my
URL so they would just read:
http://example.com/#/username
Is this possible I have been looking at route and have tried lots of
different options but none have worked?
$route['/'] = "user";
Could anyone offer any solution?

No comments:

Post a Comment