Welcome Guest, Not a member yet? Register   Sign In
Problems with redirect function
#1

[eluser]universal_serial_bus[/eluser]
Hi there,

I'm newbie with CI and I've some strange problems with redirect function.

I have a directory structure such as:

/controllers
. controller1.php
. controller2.php
. ...
. admin.php
/admin
. admin_controller1.php
. admin_controller2.php
. ...

So I want to access automatically to "admin_controller1.php" when I navigate in my browser to "http://mydomain.com/admin".

To do so, I'm using redirect function on index() of admin.php controller, and I'm doing just redirect('/admin/admin_controller'); but what I obtain is being redirect to "http://mydomain.com/mydomain/admin/" so, obviously, system can't find the controller.

Any idea?

I've defined my base_url as "mydomain/" and I'm including correctly the URL_Helper module.

Thanks everyone !


Messages In This Thread
Problems with redirect function - by El Forum - 07-05-2010, 04:56 AM
Problems with redirect function - by El Forum - 07-05-2010, 05:03 AM
Problems with redirect function - by El Forum - 07-05-2010, 05:14 AM
Problems with redirect function - by El Forum - 07-05-2010, 05:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB