Questions tagged [http-status-code-404]

The HTTP status code 404 or "Not Found" indicates the server could not find the requested file or resource.

A 404 often means that the URL requested is invalid or points to a file that no longer exists (e.g. has been moved or deleted). It can also mean that web service method or other similar resource does not exist.

Many web servers can be configured to display a specific error page when this occurs which allows users to continue navigating in a manner consistent with the design of the website.

See RFC2616 for reference.

Microsoft's Internet Information Services (IIS) versions 7, 7.5, and 8.0 provide additional sub-status values for various types of 404 response statuses. These are not recognized as standard status codes, but may be relevant for IIS-hosted applications.

Microsoft Sub-Status Codes:

404.0 – Not found.
404.1 – Site Not Found.
404.2 – ISAPI or CGI restriction.
404.3 – MIME type restriction.
404.4 – No handler configured.
404.5 – Denied by request filtering configuration.
404.6 – Verb denied.
404.7 – File extension denied.
404.8 – Hidden namespace.
404.9 – File attribute hidden.
404.10 – Request header too long.
404.11 – Request contains double escape sequence.
404.12 – Request contains high-bit characters.
404.13 – Content length too large.
404.14 – Request URL too long.
404.15 – Query string too long.
404.16 – DAV request sent to the static file handler.
404.17 – Dynamic content mapped to the static file handler via a wildcard MIME mapping.
404.18 – Query string sequence denied.
404.19 – Denied by filtering rule.
404.20 – Too Many URL Segments.

6856 questions
39
votes
9 answers

Google App Engine and 404 error

I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like - url: (.*)/ static_files: static\1/index.html upload: static/index.html - url: / static_dir:…
ctuffli
  • 3,559
  • 4
  • 31
  • 43
38
votes
10 answers

HTTP ERROR: 404 missing core name in path with solr

I am new to Solr, after installing it in ubuntu 8.10, when I was trying exampledocs to index , as per this link, I got this error: HTTP ERROR: 404 missing core name in path This is in Jetty. What shall I do, in order to solve this?
kshama
  • 1,637
  • 4
  • 18
  • 21
37
votes
9 answers

Best way to implement a 404 in ASP.NET

I'm trying to determine the best way to implement a 404 page in a standard ASP.NET web application. I currently catch 404 errors in the Application_Error event in the Global.asax file and redirect to a friendly 404.aspx page. The problem is that…
Ben Mills
  • 27,454
  • 14
  • 42
  • 38
37
votes
3 answers

How I return HTTP 404 JSON/XML response in JAX-RS (Jersey) on Tomcat?

I have the following code: @Path("/users/{id}") public class UserResource { @Autowired private UserDao userDao; @GET @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public User getUser(@PathParam("id") int…
IJR
  • 552
  • 1
  • 6
  • 10
36
votes
3 answers

Magento system.xml and 404 error when trying to access the configuration panel

I'm trying to implement some configuration settings for my custom module. I've managed to add a tab and a section in the left navigation bar. But when I want to open a section I get a 404 error page without any further information. So far, I've…
ghostrifle
  • 1,029
  • 1
  • 14
  • 24
36
votes
17 answers

Angular 2 - 404 traceur not found

I've followed the starting guide and expanded a little upon for a previous angular 2 version. I've updated my revision and changed everything accordingly. When I am running the web server I now receive the error 404 for traceur... Here is my…
Jeffrey Devloo
  • 1,406
  • 1
  • 11
  • 20
36
votes
2 answers

404 Not Found or Bad Request?

Let's say that we have the following REST call: GET api/companies/5 (get company with id 5) If company '5' doesn't exist, we would typically return a 404 Not Found response. But now, let's take this call: GET api/companies/5/invoices/10 (get…
Dave New
  • 38,496
  • 59
  • 215
  • 394
35
votes
7 answers

How to make Laravel 5 return 404 status code

I am trying to get Laravel 5 (5.1.31) to return a http status response of 404 when a page is not found. I have tried several things and it always returns 200. In my controller I have this: else { header('HTTP/1.0 404 Not Found'); return…
Dan Willett
  • 945
  • 2
  • 10
  • 20
35
votes
10 answers

Getting a HttpStatusCode of 0

Why am I getting a HttpStatusCode of 0 if I point the service my client is connecting to to a bad URL. My statusCodeAsInt is showing up as a 0. Why is it not showing up as a 404 and being handled? IRestResponse response =…
obizues
  • 1,473
  • 5
  • 16
  • 30
33
votes
2 answers

.htaccess redirect to 404 page RewriteRule

Is there a way to enter a RewriteRule in the htaccess file to redirect to a 404 page if a certain folder/url path as been typed or reached? For example, if I want every user to be redirected to a 404 page if they get to: www.mydomain.com/abc or…
user977191
  • 821
  • 2
  • 9
  • 11
32
votes
1 answer

How can I get NSURLResponse body?

I'm writing an application that connect with a server using NSURLConnection. In the delegate method didreceiveresponse, if the status code is 404, I cancel the connection and I would like to show a message with a custom error that is generated in…
32
votes
4 answers

Send a 404 error via htaccess?

I'd like to cut off access to a subdirectory on my site but I want any access in the subdirectory to be a 404 error, not a 403 forbidden. How can this be accomplished?
Citizen
  • 12,430
  • 26
  • 76
  • 117
31
votes
7 answers

CakePHP 2.0 - How to make custom error pages?

I read that the AppError class is now for backwards compatibility and that Exceptions should be used instead. How does one go about creating custom error pages for things like 404 errors, or completely custom errors?
BadHorsie
  • 14,135
  • 30
  • 117
  • 191
31
votes
6 answers

redirect 404 to similar urls

I have a website with stories in it. I can have multiple types of stories within multiple categories like: children romance scifi action thriler quests The stories are accessible using urls…
natalia
  • 839
  • 5
  • 12
31
votes
4 answers

How to detect on-page 404 errors using JavaScript?

I have an HTML page where several JavaScript, CSS and images files are referenced. These references are dynamically injected and user can manually copy the HTML page and the support files to another machine. If some JS or CSS are missing, the…
Santoo
  • 643
  • 2
  • 7
  • 17