Welcome Guest, Not a member yet? Register   Sign In
Redirect
#1

[eluser]gedev2006[/eluser]
Hi

When using the redirect() function like this:

redirect ( 'controller', 'redirect' );

When the function runs it always puts index.php in the URL like www.domain.com/index.php/controller

How can I stop the index.php being added?
#2

[eluser]iainco[/eluser]
I can only assume you're using an htaccess file to hide the index.php from appearing in the address, but you haven't changed the following in your config file:

Code:
$config['index_page'] = "index.php";

Should be:

Code:
$config['index_page'] = "";
#3

[eluser]iainco[/eluser]
Double post by accident...
#4

[eluser]elvix[/eluser]
Chels is right. the redirect function takes a controller/action argument and uses site_url("controller/action") to turn it into a url. check url_helper.php to see the entire function.

If you need a different behavior, just rewrite & rename the redirect function and place in your own helper.




Theme © iAndrew 2016 - Forum software by © MyBB