http-status-code-404

Custom 404 script in Cake PHP

This question is slightly related to my old post http://stackoverflow.com/questions/940326/dealing-with-alias-urls-in-cakephp/ After much thought, I am exploring the option of having a custom 404 script in my Cake App, that is reached when a URL does not map to any controllers/actions. This script would check $this->here and look it up ...

AJAX 404 with results using BuddyPress

On my development machine everything works fine. On the live server (Godaddy), the AJAX requests from BuddyPress are returning results and a 404 error in FireBug. But the script is seeing the results as a fail and the indicators continue to spin. Example: http://jobaru.com/ on the homepage there is Newest | Active | Popular under me...

ASP.NET MVC Action Gives 404 on Certain Params?

I'm getting a strange error in my MVC site. I have an action in my controller which responds to the default route of {controller}/{action}/{id} - in my case, /Project/Client/{id}. Depending on the id I pass to it, I get an error. With Elmah off, it's a straight-up ASP.NET 404 error. Turning Elmah on gives me the following: System.Web.H...

SEO help for replacing a website

Hello all, I run a small e-commerce site that over the last few years has built up a reasonable search engine status. I've been working on a new site that uses new URL formats and I am worried about how to deal with all the broken links and customer frustration for users finding out dated links through search engines. Can anyone offer...

In Java, how can I avoid an HTTP 404 getting a file:// URL with special characters in it?

First I'll provide a tiny code snippet here: String path = "".equals(url.getPath()) ? "/" : url.getPath(); java.io.File f = new java.io.File(path); if (!f.exists()) { this.code = 404; // http Not Found return; } Here, the URL's type is java.net.URL,and its value has this format: file:///directory1/directory2.../filename t...

looking for a link validator

Hi! I'm looking for a good link validator with a list where I can exclude URLS with wildcards. ...

How do you rebase hyperlinks and content in an ASP.NET page?

I have an ASP.NET page to handle "404 page not found" it's setup by configuring the <customErrors> section in my web.config file and setting the custom error page for 404 errors in IIS manager. It works as expected for pages in the root of my website but doesn't work in a subdirectory of the site - the hyperlinks and content in my custo...

How can I debug "/mysite/null" resource request?

I've been trying to work out why our pages load slowly, and one thing I've noticed in Fiddler is that each page load for /mysite/mypage.aspx brings with it a request for GET /mysite/null HTTP/1.1, resulting in a 404 error. I'm guessing this 404 error on every page load is slowing the site down even further, are there any ways of debugg...

enable_query_strings not working

I'm trying to use codeigniter and xdebug. When I go to http://localhost/redux/index.php, it works. When I go to http://localhost/redux/index.php?XDEBUG_SESSION_START=ECLIPSE_DBGP&amp;KEY=124466969367132, I get a 404 error. Eclipse lanches Firefox with the second URL, the wrong URL, then I have to change it. I'm using enable_query_strings...

Asp.Net MVC on Subdomain, standard MVC app gives 404's

I am trying to deploy my MVC app on a subdomain, unfortunately I get 404 errors. I tried to find out if it's MVC itself that can't handle being hosted on a subdomain. I uploaded the standard bare MVC webapp that you get when you start a new project. The index page loads, but all the other pages that require actual routing based on the ...

Apache: return 404 errors instead of 500 errors.

In apache I'd like to return 404 errors whenever I get a 500 error. Its a very strange use case, I know, but I'm wondering if its possible. I found this http://www.4webhelp.net/tutorials/misc/errors.php Which leads me to believe you can change what happens on the different errors. Something like this would be great ErrorDocument 4...

Custom 404 page with ASP.NET

It looks like my rewrite is not working correctly. It does locally but not when i upload it. How do i create a 404 page in C#.NET so i can do something simple like print the HttpContext.Current.Request.Path so i can compare it to what i expected it to be. ...

Nginx - Customizing 404 page

Nginx+PHP (on fastCGI) works great for me, but when I enter a path to a PHP file which doesnt exit, 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 this page? ...

Strange 404 error using spring mvc

This is a long shot but hopefully someone can help. My application is using spring framework mvc. 99% of if works properly. However when I attempt to go to one link lets call it [path]/link.html. I get a 404 error. If however, I go to this link within my development environment (tomcat,windows,IE and eclipse) I get no such 404 error...

Custom 404 Issue IIS6

We have taken over a site from another vendor so details on the current setup are few and far between unfortunately. They had a custom 404 page set in IIS that pointed to a basic html page in the root of the website. We have since created a 404.aspx page and set IIS to use this instead with /404.aspx as the 404 setting. The issue howe...

PHP returning page error on simplexml print_r

The problem is only happening with one file when I try to do a DocumentDOM/SimpleXML method, so it seems like the issue is with that file. No clue what it could be. If I do the following: $file = "test1.html"; $dom = DOMDocument::loadHTMLFile($file); $xml = simplexml_import_dom($dom); print_r($xml); in Chrome, I get a "Page Unavaila...

Tracking where a custom 404 is handled - code, IIS, etc??

Is there any means to track where within code a 404 error is handled? We have a site that we have taken over that doesn't seem to be reacting as expected. We have changed the IIS custom errors page to point to the new page we would like but something seems to still be redirecting it to the old 404.htm file in the root of this site. We...

PHP: prevent direct access to page

I have some pages that I don't want users to be able to access directly. I have this function I came up with which works: function prevent_direct_access() { if($_SERVER['REQUEST_URI'] == $_SERVER['PHP_SELF']) { //include_once('404.php'); header("Location: 404.php"); } } This does exactly what I want, the URL doe...

Isapi Rewrite 301 redirect resolves as 404 - circular reference?

Hi, I'm trying to use IIS Isapi Rewrite to do the following... I need seo-friendly URLs to be (silently) converted back to application friendly URLs like so: RewriteRule ^/seo-friendly-url/ /test/index.cfm [I,L] Simple enough. But I also need URLs already indexed in search engines (for example) to be 301 redirected to the seo-frien...

WCF Service Operation - GET Fails with 404

I have a WCF service which works on my dev machine running IIS 7, but my coworker is running IIS 5.1 (XP). He can view the service in a web browser when he navigates to the service page, but if he tries to call an operation or navigate to it in his web browser he gets a 404 error. I had him run ServiceModelReg -i, but that didn't chang...