Created
December 12, 2012 10:37
-
-
Save nixilla/4266781 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // apps/frontend/modules/default/actions/actions.class.php | |
| class defaultActions extends sfActions | |
| { | |
| public function executeCatchall(sfWebRequest $request) | |
| { | |
| // find your redirectation using $request->getPathInfo() | |
| $redirection = Doctrine_Core::getTable('Redirection') | |
| ->findOneByPathInfo($request->getPathInfo()); | |
| // this ensures that if there is no specified redirection, | |
| // the old sfError404Exception gets thrown | |
| $this->forward404Unless($redirection); | |
| // redirect | |
| $this->redirect($redirection['redirect_to']); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment