Skip to main content
6 events
when toggle format what by license comment
Apr 13, 2017 at 12:33 history edited CommunityBot
replaced http://webmasters.stackexchange.com/ with https://webmasters.stackexchange.com/
Jun 27, 2014 at 2:49 comment added Wossname Once you're running a script, the script is responsible for sending the status code, and the correct code to send when a query has no result is 404.
Jun 26, 2014 at 15:45 comment added Binarysurf there is a custom script retrieving composer data from database, what if somebody's name is not in there? using logic, the script will get no records from database, what should it do? maybe it will then send 404 not found. If the script found something, maybe just metadata (he's name) and no other data, it will send 200 and a page with empty content. Even if he has a custom script he will follow default web server's behaviour?, or will it respond 200 for every single request? It will look spammy with no specific content focus.
Jun 26, 2014 at 14:04 comment added Ilmari Karonen @Binarysurf: According to the OP, they're using a custom script to serve dynamic content for "virtual pages" constructed out of information stored in a database (just like Wikipedia, SE and most major websites do nowadays). This does mean that "regular web server behavior" doesn't apply -- as far as the web server (Apache, IIS, nginx, etc.) is concerned, the content-generating script exists and runs, so it defaults to a "200 OK" response, unless the script tells it otherwise. I'm just suggesting that the OP should make their script send a 404 response, if there's no actual content to show.
Jun 26, 2014 at 13:55 comment added Binarysurf Karenon, returning a 404 is equal to doing nothing, that's regular web server's behaviour; Wikipedia's example is just a custom 404 page.
Jun 26, 2014 at 13:29 history answered Ilmari Karonen CC BY-SA 3.0