3

When you set the 404/403 error pages to nodes with a path, how then can you have Drupal go to the 404 path or 403 path instead of outputting the message on the page?

For example, if I type in www.mydomain.com/skdjhfjsdhfjsh, it shows the custom 404 text from my node. But, is there a way to make Drupal send the user to www.mydomain.com/404, so I can use Contexts/Blocks with in the content area of this specific page?

2
  • 1
    Redirecting 403 or 404 errors is not a good idea. You want the 403 or 404 to be associated with the URL that the user requested. When you redirect, you need to generate a 301 or a 302 so that is what is getting associated with the URL. The 403 or 404 error would be associated only with the page you redirected to.
    – mpdonadio
    Commented Oct 27, 2011 at 17:47
  • So essentially, there is no way to add blocks to 404/403 errors at all?
    – Kevin
    Commented Oct 27, 2011 at 17:49

3 Answers 3

4

I agree that redirecting a 404 page is a bad idea. One way customize error pages is the blocks404 module.

3

Another method for showing blocks is possible with Panels.

You can configure Drupal to display a node for a 403 and/or 404. You can then configure your node view panel template appropriately. What I don't recall us being able to use the error code in play to use as visibility rules for pane content.

0

The Custom Error module lets you set up custom 403 and 404 error pages. You can also do custom redirects for 404.

Disclosure: I am the co-maintainer for Custom Error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.