简体   繁体   中英

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

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM