![]() |
alternartive to redirect('questions/index/' . $data['id'], 'location'); - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: alternartive to redirect('questions/index/' . $data['id'], 'location'); (/showthread.php?tid=10068) |
alternartive to redirect('questions/index/' . $data['id'], 'location'); - El Forum - 07-17-2008 [eluser]xpix[/eluser] 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(){ if(something){ redirect('questions/index/' . $data['id'], 'location'); }else{ $this->load->view('add-survey',$data); } } alternartive to redirect('questions/index/' . $data['id'], 'location'); - El Forum - 07-17-2008 [eluser]jnorris441[/eluser] I would look at setting up your own routing rules. You could accomplish this using a wildcard route: http://ellislab.com/codeigniter/user-guide/general/routing.html |