http-status-code-404

IIS Redirect Moved Files

I would like to reorganize the directory structure on a hosted website (i.e. I can not go in and configure the IIS settings). Say I had 3 files in the root directory: fruitcake.html, chocolateCake.html, and appleMuffins.html Now, I want to move them to a new folder called Recipes. This is easy enough, but there are a lot of existi...

ASP.NET and 404 redirect problem

I have a page that reveives a lot of incoming traffic. Some of these fail, and i want to redirect them to my main page to avoid losing potentional customers. I have tried this in my global.asax void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs Exception ...

ASP.NET and HTTP 404 problem (IIS problem)

Hi i have a asp.net webforms application which is a new version of an old webshop. I have a lot of inbound links from the Internet, that point to a particular category page: http://www.example.com/category1.html, the path to this category in the new setup is similar to: http://www.example.com/category.aspx?id=42. I have setup the Categ...

ASP.NET 4 Routing catch all

I have an ASP.NET 4 WebForms application which is using routing. I would like to catch the 404's for routes that do not exist: RouteTable.Routes.MapPageRoute("404", "{*url}", "~/error"); Problem is, this will also cause a mapping to /error for pages like ImageHandler.ashx and Resource.axd. So I add this: RouteTable.Routes.Ig...

Can view a URL through a browser but not with CURL

Hey guys, I ran into an interesting issue today when I was working on an application I'm developing. Hopefully someone knows why this is happening / how to adjust my work flow for it! Background: I'm writing an application that helps students at universities get in touch with each other. The basic workflow is as follows: User ...

Posting a status to Twitter. browser vs. code

I am trying to post a status update to Twitter. I wrote an API call so that when I do http://.....&token=$token&s=$token_secret&msg=hello ...it works fine when I type the URL into the browser. The status is posted correctly. However, when I want to post the status via file_get_contents($url) where the $url is the same as...

Is there a way to debug HTTP 500 Error Over ASP Classic Page?

My website is working fine but few pages are giving this odd error. You can check out here http://thevnsf.org/admin/EditStaff.asp ...

Android Market links on non Android browsers

Android Market links go to 404 on non Android browsers. When will Google fix this? It's really annoying having to check the user-agent and displaying something else for non Android browsers. ...

Should I throw a 404 to a request like /photo.php?id=123 if photo #123 does not exist?

The script will be called from a URL like example.com/photo.php?id=123 or example.com/photos/123 depending on if the have the pretty URLs featured enabled. If photo #123 does not exist, a request to example.com/photos/123 should throw a 404 error. But, what about example.com/photo.php?id=123? ...

CakePHP 404 on existing controller

(I'm really hoping I put in enough due dilligence on google and the search bar before posting this) I'm getting started with CakePHP and just created my first model, controller, and view. When I browse to http://localhost/~me/MyApp/Lists I get a 404 and I'm not sure why Here's my controller <?php class ListsController extends App...

ASP.NET login control hijacks my 404

I have implemented the standard Login control and everything works fine. However when i enter an invalid URL it gets redirected to the Login page. e.g. mywebsite.com/xxx correctly gives a 404 but mywebsite.com/xxx.aspx causes a redirect to the login page I am using ASP.NET 3.5 on Windows Server 2008. I have set up the web.config...

404 page in Umbraco?

I installed Umbraco 4.5 and it is running fine. one thing i cant get to work though, is the 404. When it hit a page that does not excist it shows the default IIS7 404 page, and not the built-in umbraco 404 page. So i am asuming it is a setting in the iis i have to change - but which? ...

Custom 404 redirect for a site with URL rewriting

Hi, In my site, I have used IIS7's URL rewrite module to redirect URLs like http://mysite.com/File.aspx?Name=SomeName into http://mysite.com/SomeName. It appears that IIS7 has created a corresponding rule check, so that any URL of the sort http://mysite.com/SomeURL is redirected to File.aspx. This is fine in most cases, when the URL is...

Global.asax Error handling: Quirks of server.transfer

Hi, In my global.asax, I am checking for a 404, and transferring to the 404 error page as per the below: If HTTPExceptionInstance.GetHttpCode = 404 Then Server.ClearError() Response.TrySkipIisCustomErrors = True Response.Status = "404 Not Found" Server.Transfer("~/Invalid-Page.aspx") End If ...

IIS6 MVC2 Server starts sending out 404 after a while

I have a W2k3 server running IIS6 and MVC2 (.net 4). Right after the iis starts, everything works ok, the site runs fine. Extensionless urls work ok. After a certain period of time (maybe of inactivity) the server stops working and starts to send 404 errors to the client. As soon as I restart de application pool, everithing goes back ...

Can JavaScript catch a 404 error triggered by a page’s object?

The specific problem I’m facing is with a buggy Flash application that I don’t control. When it fails, I’d like to display alternate content. The page which contains the Flash content has loaded and it’s clearly the Flash app making the request that results in this message in the debug console: Failed to load resource: the server respo...

HTTP 404 my Spring Controller is not handle on my specific URL

Hi all, I create a Controller bean to map a dedicated URI. My web.xml file : <!-- Spring MVC Servlet (that will route HTTP requests to BlazeDS) --> <servlet> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>cont...

css image path not rendering correctly

Hi Guys, web newbie here, I have a css file on my site that references an image (pic.png) like so: content { border: 1px solid #000000; background: #ffffff url(images/pic.png) 50% 50% repeat-x; color: #000000; } When I use firebug I see that it tries to get: GET /path/to/css/%22images/pic.png%22 For some reason it wraps it with u...

ASP.NET MVC 2: Avoiding loop when accessing 404 action directly

Like many people using ASP.NET MVC, I've implemented my own custom 404 error handling scheme using an approach similar to the one described here: http://stackoverflow.com/questions/619895/how-can-i-properly-handle-404s-in-asp-net-mvc/2577095#2577095 (I actually discovered that post after implementing my own solution, but what I came up ...

PHP 404 response header

Hi, I use .htaccess RewriteRules to pass the url to index.php. If the specified page name isn't found in the database, I want my script to throw proper 404 responses. The way I have tried to achieve this is: header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found"); Analysing the HTTP responses in my browser, the response comes back fi...