CodeIgniter Forums
routing issue - 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: routing issue (/showthread.php?tid=40878)



routing issue - El Forum - 04-21-2011

[eluser]rsmarsha[/eluser]
I'm working on my first CI project and am having a few issues with the routing.

My .htaccess (taken from the CI user guide) is :
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|assets|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]

My default controller is set to index which works fine. I have an about page which I can get to via /index/about. I'm guessing I have to modify my .htaccess to get rid of the index in that case.

I also have an admin controller in /application/controllers/admin named dashboard.php

I have set a route to:

Code:
$route['admin'] = 'admin/dashboard';

Which doesn't seem to work and I can't seem to work out what I'm doing wrong. I'll continue trying to work it out but any advice is much appreciated as I'm sure it's something obvious I'm missing.

thanks


routing issue - El Forum - 04-21-2011

[eluser]rsmarsha[/eluser]
Apologies to all. Smile

I had a typo in my controller name and had to take a break from the PC for a while to spot it.

Thanks to anyone who was looking at my post.