In reviewing one of our site's web logs I'm seeing instances where we are returning a 404 to requests because we're expecting an id parameter to be sent, but instead we're seeing a di parameter.

The resource in question is an image but which image file actually gets served is dependent on the id parameter. The expected url is something like http://images.mysite.com/photo.gif?id=123&width=200&height=300

What I'm seeing in the logs is requests for http://images.mysite.com/photo.gif?di=123&width=200&height=300

The only case where we are seeing this on the id parameter.

It seems unlikely that this is due to a server side or JavaScript bug since it seems to be only effecting a small percentage of our traffic. We are seeing this across a wide variety of user agents (both mobile and desktop) and IPs. Has anyone else seen this? Is there a browser plugin or other software you're aware of that could be causing this, and if so is there a good way to work around the issue?

  • 4
    I'd bet the farm that's it's a coding issue somewhere. Have you covered 100% of your code?
    – John Conde
    Jun 22, 2012 at 20:48
  • Now the real question is, are you returning BOTH incorrect and correct responses to those requests? Does it have a pattern (from one page, perhaps?) because then I'd say coding error as well.
    – ionFish
    Jun 23, 2012 at 2:34
  • @ionFish, we're always 404ing requests with no id param, and as far as I can tell always returning the correct response for well formed requests.
    – Mike Deck
    Jun 25, 2012 at 16:54
  • @JohnConde The template that creates the img tag has the id param statically coded. It's basically <img src="photo.gif?id=${theId}" />. And that's the only place in the entire system where we reference this URL that I can tell. I agree that it feels like a coding issue though...
    – Mike Deck
    Jun 25, 2012 at 16:56
  • Do any of the requests have a referrer header? Bear in mind that the referrer might be a third party... Aug 22, 2012 at 12:53

1 Answer 1


I'd scan the source of your site with grep in linux or totalcommander in windows for any instance of di or since you know the functions that are generating the image URL search the files containing those functions first.

Check if it's happening only for specific images in your application if so which images and what parts of your app are they being used in.

It's unlikely any browser plugin is reversing id to di though javascript / jQuery could do that. Server side code may also do it but it's probably just a typo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.