Welcome Guest, Not a member yet? Register   Sign In
URL REWRITTING ISSUE(HELP)
#1

[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
#2

[eluser]Isern Palaus[/eluser]
On routes.php:

Code:
$route["(:num)"] = "class/function/$1";
#3

[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
#4

[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 .




Theme © iAndrew 2016 - Forum software by © MyBB