• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


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?

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:

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

Should be:

$config['index_page'] = "";

Double post by accident...

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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.