Jump to content

Return Proper 404 Err. Header


globi
 Share

Recommended Posts

How have you noticed? What 404 page are we talking about? PW default 404 page?

It correctly throws an 404 header. It will not (of course) if you access it directly via url then it will be a 200.

A 404 in templates, you could write

throw new Wire404Exception();

This will render the 404 page and send correct 404 header.

Link to comment
Share on other sites

If you get a 302, my guess is that you are accessing a URL with another RewriteRule behind it. For instance, if you are enforcing trailing slashes via an .htaccess file, and you access a URL without trailing slashes, then Apache will first redirect to the same URL with a slash (which could be a 302), and the resulting page will have a 404. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...