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
74
votes
15 answers

Flutter how to handle Image.network error (like 404 or wrong url)

How to handle Image.network when the url is wrong or the destination leads to 404. for example try Image.network('https://image.tmdb.org/t/p/w92')
mohamed zayani
  • 943
  • 1
  • 6
  • 10
73
votes
7 answers

Tomcat started in Eclipse but unable to connect to http://localhost:8085/

I configured Tomcat 6.0.24 in Eclipse on port 8085 and started successfully with log as below: Feb 17, 2010 4:24:31 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal…
komal
  • 743
  • 2
  • 7
  • 6
73
votes
19 answers

Laravel 4 All Routes Except Home Result in 404 Error

I installed Laravel 4 using Composer and also set up a virtual host. Currently, only the root route is working:
Amit Erandole
  • 11,995
  • 23
  • 65
  • 103
66
votes
8 answers

ERROR 404.3 Not Found for JSON file

I have been getting the "ERROR 404.3 Not Found" for JSON file that I am calling using AJAX call on "Internet Information Services 7.5" even after I have activated all the "Application Development Features". Other than JSON file, all other files are…
Nitin Suri
  • 960
  • 1
  • 8
  • 20
62
votes
6 answers

header('HTTP/1.0 404 Not Found'); not doing anything

I have a 404.php file in my site's main directory and I was using header('Location: 404.php'); for a while until someone said that you should use header('HTTP/1.0 404 Not Found'); instead. So I replaced it with that and then added: ErrorDocument 404…
John Smith
  • 8,567
  • 13
  • 51
  • 74
62
votes
2 answers

In a single-page app, what is the right way to deal with wrong URLs (404 errors)?

I am currently writing a web application using angularjs, but I think this question applies to any client-side javascript framework that does routing on the client side (as angular does). In a single-page app, what is the right way to deal with…
61
votes
5 answers

Nginx - Customizing 404 page

Nginx+PHP (on fastCGI) works great for me. When I enter a path to a PHP file which doesn't exist, instead of getting the default 404 error page (which comes for any invalid .html file), I simply get a "No input file specified.". How can I customize…
thomas55
  • 891
  • 2
  • 9
  • 12
60
votes
8 answers

Return Custom HTTP Status Code from WebAPI 2 endpoint

I'm working on a service in WebAPI 2, and the endpoint currently returns an IHttpActionResult. I'd like to return a status code 422, but since it's not in the HttpStatusCode enumeration, I'm at a loss as to how it would be sent, since all of the…
Garrison Neely
  • 3,238
  • 3
  • 27
  • 39
59
votes
13 answers

HTTP Status 404 - The requested resource (/) is not available

I integrated Tomcat 7 in Eclipse. When I start it using Eclipse, it shows that Tomcat is up and running, but when I go to http://localhost:8080 in my browser, it gives me following error: HTTP Status 404 - / type Status report message / description…
Vandan Patel
  • 1,012
  • 1
  • 12
  • 23
59
votes
6 answers

Page not found 404 Django media files

I am able to upload the files to media folder( '/peaceroot/www/media/') that I have set up in settings.py as below MEDIA_ROOT = '/peaceroot/www/media/' MEDIA_URL = '/media/' But through admin I tried to access the uploaded image…
59
votes
5 answers

Phonegap Cordova Ajax requests 404 (Not Found) Error

My cordova version is 5.0.0 I am getting a 404 error for the all ajax request made when the app is deployed on the device. On the web browser, it works fine but same app when deployed on a device does not work. I tried adding following to solve the…
Sahil
  • 1,959
  • 6
  • 24
  • 44
57
votes
6 answers

HTTP GET Request Status 204 Vs 404

I have 2 resources User and Album. A user has a list of albums. To get albums there are 2 REST API. user/{userId}/albums/{albumId} gets album by albumId. If not found returns 404 user/{userId}/albums gets all albums by userId. In this case, if a…
Navrattan Yadav
  • 1,993
  • 1
  • 17
  • 22
55
votes
4 answers

How can I return a 404/50x status code from a Grails Controller?

I have a controller that needs to return a 404 page and status code on certain conditions. I can't seem to find out how to do this in Grails. A coworker recommended this method: response.sendError(HttpServletResponse.SC_NOT_FOUND) which works…
Jack Chu
  • 6,791
  • 4
  • 38
  • 44
52
votes
8 answers

How to make a catch all route to handle '404 page not found' queries for ASP.NET MVC?

Is it possible to create a final route that catches all .. and bounces the user to a 404 view in ASP.NET MVC? NOTE: I don't want to set this up in my IIS settings.
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
52
votes
8 answers

using javascript to detect whether the url exists before display in iframe

I'm using javascript to pass a dynamic url to iframe src. but sometimes the url does not exist, how could i detect the non-exist url beforehand, so that i can hide the iframe that with 404 error.
Mario
  • 855
  • 4
  • 19
  • 30