Forum Moderators: coopster
https://www.example.com/category/page1.html
https://www.example.com/category/page2.html https://www.example.com/category/disch.com
https://www.example.com/category/nbc.com
https://www.example.com/category/espn.com [edited by: phranque at 9:39 am (utc) on Sep 17, 2018]
[edit reason] exemplified domain [/edit]
If part of the link is missing ... visitors get redirected to the error page.Do you mean literally redirected, i.e. a 300-class response telling them to make a fresh request for the error page? Or did you really mean that they get a 404 response, and you've got a particular page in place for those 404s?
Do you mean literally redirected, i.e. a 300-class response telling them to make a fresh request for the error page? Or did you really mean that they get a 404 response, and you've got a particular page in place for those 404s?
https://www.example.com/main-category/sub-category https://www.example.com?main-category.php=sub-category https://www.example.com/error.php ErrorDocument 404 /404.php which could just as easily be named error.php - it just lets the server supply the 404 header and serve a nicer page than most default 404 pages. Google does not like 'soft 404's but 404s are a normal occurrence. ErrorDocument 404 https://www.example.com/error.php I already had this:Well, that explains it. If your ErrorDocument directive--for any error--includes the protocol and hostname instead of starting with bare / then errors will not receive a 404 (or whatever number) response. They'll get a 302 redirect to the new URL.
if (function_exists('http_response_code'))
{ http_response_code(404); }
else
{ header($_SERVER['SERVER_PROTOCOL'] . " 404 Not Found"); }
include ($_SERVER['DOCUMENT_ROOT'] . "/missing.html");