Jump to content

Sending 404 errors on custom cms


tommyda

Recommended Posts

Hi I am building a cms/review system and I would like to send 404 headers when a user attempts to visit the page without the required get variables.

 

Example:

 

This page will show the data from the database: review.php?sid=1

However this page will return a 404 error: review.php, review.php?sid=r4hui ect..

 

I am fully aware of how to do this I just needed to know if it would be a problem for google if review.php sends 404 but review.php?sid=1 doesnt.

 

How can I do this?

Link to comment
https://forums.phpfreaks.com/topic/142359-sending-404-errors-on-custom-cms/
Share on other sites

I have no evidence to back this up....

 

Anyway, the dynamic pages would have to be reached by links on your site or google wouldn't know they were there.  But, I don't know if google would follow the links if the page without the GET stuff returned a 404 header.  It might think the physical file doesn't exist and just skip it.

I have no evidence to back this up....

 

Anyway, the dynamic pages would have to be reached by links on your site or google wouldn't know they were there.  But, I don't know if google would follow the links if the page without the GET stuff returned a 404 header.  It might think the physical file doesn't exist and just skip it.

 

Thats exactly what I was thinking, I think I might just do a redirect to an error page but not send 404 headers.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.