Pass agrument to home page - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Pass agrument to home page (/showthread.php?tid=37309) Pages:
1
2
|
Pass agrument to home page - El Forum - 01-07-2011 [eluser]InsiteFX[/eluser] You will also need a method called username! Otherwise it will default to the index method! InsiteFX Pass agrument to home page - El Forum - 01-11-2011 [eluser]thephpguy[/eluser] [quote author="Atharva" date="1294316412"] Code: $route['^(?!controller1|controller2|controller3).*'] = "yourcontroller/yourfunction/"; What this will do is this will redirect domain.com/username to yourcontroller/yourfunction. It will check if the controller in the uri is NOT the one mentioned in the rule. So you can have a special controller only for handling the 'domain.com/username' link structure.[/quote] I tried that and it works for me. The only problem i have to keep adding controllers in the route as i create new. |