Skip to content

Instantly share code, notes, and snippets.

@philsturgeon
Created July 19, 2010 12:28
Show Gist options
  • Save philsturgeon/481331 to your computer and use it in GitHub Desktop.
Save philsturgeon/481331 to your computer and use it in GitHub Desktop.
preg_match('/^\/(cms|admin|manage)/', $_SERVER['REQUEST_URI'], $matches);
if ( ! empty($matches[1]))
{
$config['sess_cookie_name'] = $matches[1].'_session';
}
else
{
$config['sess_cookie_name'] = 'user_session';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment