Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_sub_skipping_to_another_action" rel="nofollow noreferrer">http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_sub_skipping_to_another_action</a> (scroll down a few paragraphs)</p> <p><strong>Using</strong></p> <p><a href="http://www.symfony-project.org/api/1_4/sfAction" rel="nofollow noreferrer">http://www.symfony-project.org/api/1_4/sfAction</a></p> <p>You have access to a number of 404 redirection methods (redirect404, forward404, forward404If, forward404Unless) which are detailed on the link above. You have access to all of these methods from within your actions:</p> <pre><code>public function executeAction(sfWebRequest $request) { $this-&gt;forward404(); } </code></pre> <p>I would recommend using forward404 instead of redirect404 as the latter will push the redirection back to the browser and show your user the 404 page's URL instead of the URL they attempted to access.</p> <p><strong>Configuring</strong></p> <p>You can configure the module and action that should be executed when a 404 is triggered in your application's <code>config/settings.yml</code> like this:</p> <pre><code>all: .actions: error_404_module: my_module # To be called when a 404 error is raised error_404_action: my_action # Or when the requested URL doesn't match any route </code></pre> <p><strong><em>Update:</em></strong></p> <p>For general information on Symfony check out the three books they have available online: <a href="http://www.symfony-project.org/doc/1_4/" rel="nofollow noreferrer">http://www.symfony-project.org/doc/1_4/</a>, 'Practical Symfony' being a great place to get started. There is also a complete API reference available: <a href="http://www.symfony-project.org/api/1_4/" rel="nofollow noreferrer">http://www.symfony-project.org/api/1_4/</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload