Subfolder organization |
[eluser]rolandpish[/eluser]
Hello. I'm in the first time using codeigniter. I installed it in: http://localhost/codeigniter I need to develop a site with a public access area and an administration area, so I created an "admin" folder under application/controllers folder, and created an "admin" folder under application/views folder as well. Then as a test, I created a sample controller (login.php) under controllers/admin folder with the following code: Code: <?php Code: <html> Quote:$route['admin'] = 'admin/login';in routes.php file. I have tried pointing to: http://localhost/codeigniter/admin http://localhost/codeigniter/admin/login but got a 404 error. As I pointed, I'm a newbie with codeigniter. What am I doing wrong? Thanks in advance
[eluser]pistolPete[/eluser]
Do you use a .htaccess file? Did you set RewriteBase correctly?
[eluser]rolandpish[/eluser]
Yes, this is the .htaccess file I put inside http://localhost/codeigniter folder: Code: <IfModule mod_rewrite.c>
[eluser]pistolPete[/eluser]
I guess you need to set Code: RewriteBase /codeigniter
[eluser]rolandpish[/eluser]
I changed that, but it's not working, it keeps showing: The requested URL /codeigniter/admin was not found on this server.
[eluser]rolandpish[/eluser]
Update: I removed the .htaccess file, reconfigured config.php file and it worked. Something is wrong with my .htaccess.
[eluser]rolandpish[/eluser]
Well, first I want to say I'm sorry for my stupidity because I realized I didn't have the "AllowOverride FileInfo" directive on my document root apache configuration, so the .htaccess file wasn't doing anything. Now everything works like a charm. Sorry and thanks a lot! |
Welcome Guest, Not a member yet? Register Sign In |