Redirect |
[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?
[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'] = "";
[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. |
Welcome Guest, Not a member yet? Register Sign In |