Welcome Guest, Not a member yet? Register   Sign In
Blog URIs: many different ways to construct them. What did you do?
#9

[eluser]keld[/eluser]
Hey JoostV I like your idea of doing a 301 when the id doesn't match the title. That's what I've been trying to do.
How exactly did you setup this?
In your controller, before you load the view and after you called your model and retrieved you data array you check if the id returned matches the title and if not you do something like that?
Code:
if ($data[id]!=$this->uri->segment(3) || $data[title]!=$this->uri->segment(4)){
        redirect('/article/13', 'location', 301);
}else{
        $this->load->vars($data);
        $this->load->view('template');
}

Now what do you put in the redirect function for the parameters, the article id has priority over the article name i guess?

Thank you


Messages In This Thread
Blog URIs: many different ways to construct them. What did you do? - by El Forum - 01-11-2010, 01:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB