Skip to content

Instantly share code, notes, and snippets.

@jseverson
Created October 7, 2011 16:07
Show Gist options
  • Save jseverson/1270675 to your computer and use it in GitHub Desktop.
Save jseverson/1270675 to your computer and use it in GitHub Desktop.
public function catchallAction($slug)
{
//lets see if its a program slug
if ($program = $this->get('exercise.program.repository.program')->findOneBySlug($slug)) {
//we want to enforce this request to be secure but only on production
if (!$this->get('request')->isSecure()) {
//redirect to same url but on secure port
}
return $this->forward('ProgramBundle:ProgramSignup:sales', array('slug' => $slug));
}
throw new NotFoundHttpException();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment