Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]Segments without index.php
#1

[eluser]Jaketoolson[/eluser]
It seems as though uri segments without index.php doesn't work correctly, unless I'm doing something wrong.

I load my models based on the uri segment and have removed index.php from the uri. It only works with index.php otherwise it errors out. Any suggestions?

site.com/index.php/view/html/model_name_here

Here is the code from my controller __construct:
Code:
$this->options['uri'] = $this->input->xss_clean($this->uri->uri_to_assoc(4));
$this->options['uri']['controller'] = $this->input->xss_clean($this->uri->segment(1));
$this->options['uri']['action'] = $this->input->xss_clean($this->uri->segment(2));
$this->options['uri']['id'] = @$this->input->xss_clean($this->uri->segment(3));
        
$action = $this->options['uri']['action'];
$model_name =  $this->options['uri']['id'];

$this->load->library('table');    
$this->load->model($model_name);


Messages In This Thread
[SOLVED]Segments without index.php - by El Forum - 11-15-2010, 11:50 PM
[SOLVED]Segments without index.php - by El Forum - 11-16-2010, 01:43 AM
[SOLVED]Segments without index.php - by El Forum - 11-16-2010, 04:46 AM
[SOLVED]Segments without index.php - by El Forum - 11-16-2010, 10:12 AM
[SOLVED]Segments without index.php - by El Forum - 11-16-2010, 10:39 AM
[SOLVED]Segments without index.php - by El Forum - 11-16-2010, 10:43 AM
[SOLVED]Segments without index.php - by El Forum - 11-16-2010, 10:46 PM
[SOLVED]Segments without index.php - by El Forum - 11-17-2010, 01:22 AM
[SOLVED]Segments without index.php - by El Forum - 11-17-2010, 02:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB