0

I hate the codeigniter custom urls where it's: domain.com/controller/action/username

How can I have it like a normal website like: domain.com/username

Please give me a suggestion.

2
  • 1
    possible duplicate of CodeIgniter - Remove "Index" From URL Commented Sep 13, 2013 at 8:56
  • 1
    Something like this : $route['controller/(:any)'] = 'controller/index/$1'; Commented Sep 13, 2013 at 8:57

2 Answers 2

4

You try this in routes.php

$route['(:any)']        = "controller/action/$1";

Here is the routing documentation : routing

Sign up to request clarification or add additional context in comments.

Comments

2

Please refer http://ellislab.com/codeigniter/user-guide/general/routing.html. You can do this by URL routing

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.