404错误在移动设备,但是,PC浏览器的工作原理 [英] 404 error on mobile device but works on pc browser

查看:130
本文介绍了404错误在移动设备,但是,PC浏览器的工作原理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个愚蠢的问题......但我试图让使用的PhoneGap和Dojo我的第一个应用程序。我能够从服务器使用AJAX和读取一些数据。这对Android模拟器工作正常。我还可以键入URL到我的桌面浏览器和看到的价值。我使用的春天JSON对象。

This might be a dumb question...but I am trying to make my first app using phonegap and dojo. I am able to use ajax and read some data from the server. This works fine on the android emulator. I can also type the url into my desktop browser and the see the value. I am using spring with json objects.

当我输入相同的URL到我的手机网页浏览器,我得到一个404错误。谁能告诉我为什么?我很新的移动开发,我觉得我失去了一些东西。

When i type the same url into my phone web browser I get a 404 error. Can someone tell me why? I am very new to mobile development and I feel like i am missing something.

URL是公开的。

感谢

更新
使用相同的Ajax调用我可以到以下网址 http://search.twitter.com /search.json?q=bacon 它从Twitter返回一个JSON文件。因此,我不认为这是我的客户code。任何其他的想法?

UPDATE Using the same ajax call I can get to the following url http://search.twitter.com/search.json?q=bacon which returns a json file from twitter. So I don't think it is my client code. Any other ideas?

推荐答案

感谢大家的帮助。它结束了由nginx的重新路由移动请求到该应用程序不是托管的服务器被casued。因此,404错误。

Thanks everyone for the help. It ended up being casued by nginx rerouting the mobile requests to a server where the app was not hosted. Hence the 404 errors.

这篇关于404错误在移动设备,但是,PC浏览器的工作原理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆