alternartive to redirect('questions/index/' . $data['id'], 'location');

Hi all,

I am looking for an alternative to the following line of code

redirect('questions/index/' . $data['id'], 'location');

I do not want to use the "/index/" but I do want to add the ID in the URI

this line is used inside a controller like this

function add(){
redirect('questions/index/' . $data['id'], 'location');


I would look at setting up your own routing rules. You could accomplish this using a wildcard route:

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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