set your sites 403 and 404 Error pages

Last modified: January 28, 2008 - 16:08

Drupal's page error messages are meant to be direct and to the point. If you want page error messages that are a little more user-friendly, Drupal allows you to customize them. Just follow these steps:

  1. Create two nodes, one for each kind of page error (403 and 404).
  2. Determine the id number of the node you wish to have Drupal redirect users to. One way to determine the node's id number is to visit the node and look at the number after the last slash in your browser's address bar. This is your node's id number.
  3. Now enter the paths to your nodes into the appropriate boxes on your error reporting settings page (mysite.com/admin/settings/error-reporting) For example, if the node id number for 403 error codes is "83," you would type "node/83" into the "Default 403 (access denied) page" setting.

Because you are creating nodes for this, they will show up in the tracker and popular content blocks and anywhere else real nodes would show up. If this isn't acceptable, there is a contributed module called Custom Error that avoids this problem.

 
 

Drupal is a registered trademark of Dries Buytaert.