Hi all,
Another small issue I am having is as follows.
I have a custom 404.php page which shows site navigation and a google search box set to search the site by default.
In some of my php files I have a need to return 404 status to the client (for example wrong category, or filename, etc).
But if I do:
The client gets a blank page instead of my custom 404.php page.
If on the other hand I do this:
Then the browser (and the googlebot as well) first get 302 response code, than 200 OK code which are both wrong.
In other words, I can either return 404 status code, but my custom 404 page doesn't show or I can show the page but send the wrong status code.
I am pulling my hair over this one so I would appreciate any help.
Another small issue I am having is as follows.
I have a custom 404.php page which shows site navigation and a google search box set to search the site by default.
In some of my php files I have a need to return 404 status to the client (for example wrong category, or filename, etc).
But if I do:
Code:
Header("HTTP/1.1 404 File Not Found");
If on the other hand I do this:
Code:
Header("Location: /404.php");
In other words, I can either return 404 status code, but my custom 404 page doesn't show or I can show the page but send the wrong status code.
I am pulling my hair over this one so I would appreciate any help.
Comment