The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested.

learn more… | top users | synonyms (1)

232
votes
10answers
45k views

How can I properly handle 404 in ASP.NET MVC?

I am just getting started on ASP.NET MVC so bear with me. I've searched around this site and various others and have seen a few implementations of this. EDIT: I forgot to mention I am using RC2 ...
148
votes
3answers
53k views

How to redirect to a 404 in Rails?

I'd like to 'fake' a 404 page in Rails. In PHP, I would just send a header with the error code as such: header("HTTP/1.0 404 Not Found"); How is that done with Rails?
68
votes
5answers
20k views

Why is @font-face throwing a 404 error on woff files?

I'm using @font-face on my company's site and it works/looks great. Except Firefox and Chrome will throw a 404 error on the .woff file. IE does not throw the error. I have the fonts located at the ...
59
votes
9answers
50k views

Easy way to test a URL for 404 in PHP?

I'm teaching myself some basic scraping and I've found that sometimes the URL's that I feed into my code return 404, which gums up all the rest of my code. So I need a test at the top of the code to ...
57
votes
12answers
66k views

Sending a 404 error in PHP

if (strstr($_SERVER['REQUEST_URI'],'index.php')) { header('HTTP/1.0 404 Not Found'); } Why wont this work? I get a blank page.
55
votes
6answers
14k views

What is the proper way to send an HTTP 404 response from an ASP.NET MVC action?

If given the route: {FeedName}/{ItemPermalink} ex: /Blog/Hello-World If the item doesn't exist, I want to return a 404. What is the right way to do this in ASP.NET MVC?
41
votes
7answers
10k views

How to get MVC action to return 404

I have an action that takes in a string that is used to retrieve some data. If this string results in no data being returned (maybe because it has been deleted), I want to return a 404 and display an ...
39
votes
7answers
26k views

ASP.NET Custom 404 Returning 200 OK Instead of 404 Not Found

After trying to setup my site for Google Webmaster Tools I found that my Custom ASP.NET 404 page was not returning the 404 status code. It displayed the correct custom page and told the browser that ...
37
votes
9answers
39k views

Custom ASP.NET MVC 404 Error Page

I am trying to make a custom HTTP 404 error page when someone types in a URL that doesn't invoke a valid action or controller in ASP.NET MVC. Instead of it displaying the generic Resource Not Found ...
31
votes
7answers
15k views

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: ...
29
votes
3answers
6k views

Google Analytics - Failed to load resource: http://www.google-analytics.com/ga.js

I've been noticing this error on Chrome's console for a while now: I modified Google's script so that it logs the error, because it uses try{} catch{}, and this is what I got: I haven't noticed ...
25
votes
5answers
16k views

Django staticfiles app help

I've having a little issue with Django's staticfiles app. I have added 'django.contrib.staticfiles', to my INSTALLED_APPS and have added STATIC_URL = '/static/' STATIC_ROOT = ...
24
votes
6answers
571 views

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 like: ...
21
votes
4answers
22k views

How can i 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.
21
votes
4answers
16k views

Basic Rails 404 Error Page

I have been looking for a simple answer to this for a ridiculously long time and it seems like this has to be so plainly obvious and simple because no one has an easy, idiot proof tutorial. Anyway, ...

1 2 3 4 5 132
15 30 50 per page