1

I want all URI to route to default_controller/(:any)

for example if the url looks like this : www.anypage.com

I want www.anypage.com/test_segment to route to www.anypage.com still where I will read Segment 1 to customize my site

the reason why I am doing this is to avoid doing something ugly like www.anypage.com?s=test_segment

Thank you for your help

salmane
  • 4,749
  • 13
  • 47
  • 61

2 Answers2

3

Between the documentation and this answer you should have everything you need. There are lots of other answers on StackOverflow covering this topic as well.

Community
  • 1
  • 1
Dan Blows
  • 20,197
  • 9
  • 61
  • 93
2

You can use something like $route['404_override'] = 'default_controler/lookup_method'; in application/config/routes.php

kuboslav
  • 1,380
  • 5
  • 15
  • 31