Xubayer pantho
Xubayer pantho

Reputation: 329

Remove Controller & function name from url using codeigniter

I want to remove controller and function name from my url. my url looks like

example.com/config/addRoom.aspx

where "config" controller name & "addRoom" function/method name. I am using htaccess for remove index.php. and I configure my routes.php file like this

    $route['room'] = "config/addRoom";

but it's not working. pages are not found plz help

Upvotes: 0

Views: 1531

Answers (1)

Rishi Shrivastava
Rishi Shrivastava

Reputation: 301

Please Write "room" at the place from where you want the redirection .. like now you are writing

in Controller :- redirect("config/addRoom") ;

Make It Redirect("room");

Or In View :- now you are write like href="config/addRoom"

Please Make it

href="room"

Upvotes: 1

Related Questions