CodeIgniter Forums

Full Version: mod_rewrite and controllers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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" ?

El Forum

[eluser]bronet[/eluser]
Read about URI Routing and you'll find out how can be done: http://ellislab.com/codeigniter/user-gui...uting.html