0

If I set a http header to a 404, will the page then stop processing? It seems that way on one server but on another it continues to process what's on the page. I would prefer to have it continue to process so that I can provide further error messaging on the page. Is it a setting on the server perhaps?

2
  • Ok, Ive not given a good example. Its not just 404 pages, its any error page ie. 400's and 500's. If I set my header to any error code it seems to stop running the page. I want to set the header and then display an error message but it seems when it receives the header the page stops running and never displays the error message. Commented May 21, 2012 at 9:51
  • In fact please see my other post for more in depth example and showing the code. stackoverflow.com/questions/10653978/… Commented May 21, 2012 at 11:47

4 Answers 4

4

When you raise a 404 error, the page doesn't stop processing. Except if you ask it explicitly.

Simple non-technical example: If the page stopped processing, there wouldn't be sites with a custom 404 page. :)

Sign up to request clarification or add additional context in comments.

Comments

1

The page will still process, otherwise custom 404 pages woundn't be possible. Make sure you have error reporting turned on, as you may have a PHP error that's causing the script to stop running before the page is generated.

Comments

1

Normally you can set your 404 page in apache. This page should be processed.

Comments

0

Turns out it was an issue with CURL. Thanks for your help.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.