Welcome Guest, Not a member yet? Register   Sign In
Best way to generate part of a URL that is just used for visuals/seo
#2

[eluser]Developer13[/eluser]
Is "id" literally the letters "i" and "d", or is it a numeric key value? If it's not literally "id", you really don't need it there in the first place. You can store your some-description-just-for-visuals-and-seo as the 'url friendly slug' in your database along with the record it belongs to. You would then use the slug to pull the record from the database instead of the id.

As far as making sure a particular segment is present:

Code:
<?php if (!$this->uri->segment(n)) { redirect('somewhere_else'); } ?>

n would represent the number of the segment.


Messages In This Thread
Best way to generate part of a URL that is just used for visuals/seo - by El Forum - 07-19-2011, 10:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB