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

[eluser]universal_serial_bus[/eluser]
@WanWizard thx for the response, you're absolutely right. But my controller name is not admin.php... I wrote that as an example. My fault.

I've a controller named "godmode.php" and a directory named "admin".
Anyway, if I try to redirect to another controller on the same folder, such as "users.php", it fails at same point.

I'm working on localhost, and the CI root directory is "/codeigniter", so my base_url has value "localhost/codeigniter/" and when I'm trying to redirect something, system automatically prepends base_url to my controller target URL... so, if I call:

"http://localhost/codeigniter/godmode/"

I execute the index() function of the controller, where I do:

redirect("/admin/test")

But I'm redirected to:

"http://localhost/codeigniter/localhost/codeigniter/admin/test"

And I don't know why it happens...


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