Welcome Guest, Not a member yet? Register   Sign In
Some URL Help
#1

[eluser]Phil Sturgeon[/eluser]
Hey gang,

Trying to get some real simply URL processing for a project im on. I have never got on shockingly well with regex or mod_rewriting subdomain urls, so how can I force the folllowing links to some CI controllers? I understand there will be a mix of routes and mod_rewrite but im struggling on them both.

http://groups.sitename.com/group_name

and

http://sitename.com/user_name

I need to somehow turn the names into userID and groupID but im thinking I can just add an extra method to a controller like:

Code:
function group_from_name($group_name)
{
$groupID = $this->group_model->getIDfromName($group_name);
$this->profile($groupID)
}

function profile($groupID)
{
bla bla normal group profile code...
}

Been pondering this one for a while!


Messages In This Thread
Some URL Help - by El Forum - 10-17-2007, 08:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB