Welcome Guest, Not a member yet? Register   Sign In
Default controller is always loaded event the URL
#1

[eluser]zerofook[/eluser]
Hello guys.
I'm new to CodeIgniter.
I downloaded the latest version(2.1.0) of the CodeIgniter framework.
Now I'm testing the framework, but I was stuck with an url issue.
I'm using Ubuntu 12.04 and apache2 server.
My application is stored in /var/www/fleezor folder.
The problem is that if I request http://localhost/fleezor I'm getting the main controller view, which is the correct behaviour, but if I request http://localhost/fleezor/test/index (ot http://localhost/fleezor/index.php/test/index) I'm redirected again to the default_controller page (the "main" controller).

I was made all of the needed configurations. My configurations are:


conf.php

Quote:$config['base_url'] = 'http://localhost/fleezor/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

httpd.conf
Quote:<Directory "/var/www/fleezor">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

.htaccess
Quote:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /fleezor/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>

routes.php
Quote:$route['default_controller'] = "main";
$route['test'] = 'test';

P.S. The code in the test controller is working properly. I have tested it if I switch the default_controller to be "test".

Please HELP me !!! Smile

Regards, Lubo.


Messages In This Thread
Default controller is always loaded event the URL - by El Forum - 05-28-2012, 02:46 PM
Default controller is always loaded event the URL - by El Forum - 05-28-2012, 03:34 PM
Default controller is always loaded event the URL - by El Forum - 05-28-2012, 03:47 PM
Default controller is always loaded event the URL - by El Forum - 05-28-2012, 03:49 PM
Default controller is always loaded event the URL - by El Forum - 05-28-2012, 03:57 PM
Default controller is always loaded event the URL - by El Forum - 05-28-2012, 04:26 PM
Default controller is always loaded event the URL - by El Forum - 05-29-2012, 12:20 AM
Default controller is always loaded event the URL - by El Forum - 05-29-2012, 04:09 AM
Default controller is always loaded event the URL - by El Forum - 05-29-2012, 10:02 AM
Default controller is always loaded event the URL - by El Forum - 05-29-2012, 12:08 PM
Default controller is always loaded event the URL - by El Forum - 05-29-2012, 12:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB