mod_rewrite and controllers - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: mod_rewrite and controllers (/showthread.php?tid=34420) |
mod_rewrite and controllers - El Forum - 09-29-2010 [eluser]adaxa[/eluser] Hi everyone ! In controller directory I have two sub directories "main" and "back" which contain some controllers. To access http://localhost/some_controller (some_controller is in "main" directory) I have a htaccess file with this line RewriteRule ^(.*)$ index.php/main/$1 [L] How to redirect queries to "back" if the URL contain word "back" ? mod_rewrite and controllers - El Forum - 09-29-2010 [eluser]bronet[/eluser] Read about URI Routing and you'll find out how can be done: http://ellislab.com/codeigniter/user-guide/general/routing.html |