URL REWRITTING ISSUE(HELP) |
[eluser]seeraw[/eluser]
Hi example.com/class/function/ID if this is my url I want to show url like example.com/ID Any help how to achieve this? Thanks Seeraw
[eluser]Isern Palaus[/eluser]
On routes.php: Code: $route["(:num)"] = "class/function/$1";
[eluser]seeraw[/eluser]
Yes I did this but it's working fine only with this class and function name what about if I want to use another class and function it still redirect to the same and I am getting error on other pages. Any help, Thanks Seeraw
[eluser]vikascoollives[/eluser]
You can define a custom route in config/routes.php - for example: $route['about'] = 'name_controller/about'; Then, http://example.com/about goes to http://example.com/name_controller/about Replace the controller and function name if get otherwise it will go to the default controller and function . |
Welcome Guest, Not a member yet? Register Sign In |