CodeIgniter Forums
redirect() leaves off trailing slash - affecting cache / delete of cache file. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: redirect() leaves off trailing slash - affecting cache / delete of cache file. (/showthread.php?tid=43364)



redirect() leaves off trailing slash - affecting cache / delete of cache file. - El Forum - 07-08-2011

[eluser]internut[/eluser]
I'm using the cache feature within an admin area.

If data is updated I remove the cache file so the new data is presented.

The redirect code even if i have a trailing slash in it never is present on the redirect:

Code:
redirect('/admin/forms/manage/' . $form_id . '/');

returns to:

/index.php?/admin/forms/manage/176

and not:

/index.php?/admin/forms/manage/176/

Thoughts?

J


redirect() leaves off trailing slash - affecting cache / delete of cache file. - El Forum - 07-08-2011

[eluser]internut[/eluser]
looks like config option:

$config['url_suffix'] = '/';

will do the trick.

If I'm missing something would love to hear it.

THX!


redirect() leaves off trailing slash - affecting cache / delete of cache file. - El Forum - 07-08-2011

[eluser]internut[/eluser]
damn that didn't work out well... messed up deleting cache files on updates. back to the drawing board.


redirect() leaves off trailing slash - affecting cache / delete of cache file. - El Forum - 07-08-2011

[eluser]internut[/eluser]
believe

Code:
redirect(site_url() . 'admin/forms/manage/' . $form_id . '/');

has set me on the right path.