• Welcome to PHPVIBE Forums. Please log in.

Non-existent pages do not return 404 Not found

Started by Grim,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GrimTopic starter

The non-existent pages should have a 404 Not found server response, but they currently return 200 OK.
I googled and tried to add the appropriate command to the 404.php file in theme folder, but got 404 Not found for ALL pages...
I would be very grateful if you could help me with this. Thanks in advance!


I asked this question earlier, but now for some reason I can't find this post.
  •  

Marius P.

Hello!

Was saying before that the 404 layout code is in here https://github.com/PHPVibe/PHPVibe/blob/master/themes/main/404.php

It should trigger  a not-found header

header("Status: 404 Not Found");
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

GrimTopic starter

The problem is that it doesn't work on my site.
You can check, for example, this URL - https://clipz.ru/video/274/bloodywood-gaddaar/
If you just go to it, you will see 404 page.
But if you check this URL with any service, like https://httpstatus.io/, you will see that the server response is 200 OK.
  •  

Marius P.

Try this
header("HTTP/1.0 404 Not Found");

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  
    The following users thanked this post: Grim

GrimTopic starter

Quote from: Marius P. on Try this
header("HTTP/1.0 404 Not Found");
Looks like it worked, thanks a lot!
  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

 

Similar topics (7)

[ Video Sharing CMS v4 ] Set pages to "noindex" using custom field

Started by DonGito


Replies: 1
Views: 1630

[ Video Sharing CMS v4 ] Page Not Found

Started by teckvo


Replies: 2
Views: 1012

[ Video Sharing CMS v4 ] 404 OOPS! PAGE NOT FOUND

Started by mmauno


Replies: 17
Views: 3881

Allowing PHP beside HMTL in New Pages Created

Started by Icey


Replies: 6
Views: 1508

[ Video Sharing CMS v4 ] phpvibe setup Not Found ?

Started by matrak


Replies: 4
Views: 1984

[ Video Sharing CMS v4 ] How to create custom static pages

Started by mistervibe


Replies: 4
Views: 4313

[ Video Sharing CMS v4 ] OOPS! PAGE NOT FOUND

Started by ender3445


Replies: 7
Views: 1346