Apache get参数的某些值出现错误404
我正在一个网站上工作,其中一个脚本称为:Apache get参数的某些值出现错误404,apache,url,Apache,Url,我正在一个网站上工作,其中一个脚本称为: http://localhost/query.php?lat=1.361109&lng=103.828969&rad=2 [404] 我得到这个URL的404 Not found错误,同时对于一个参数的稍微不同的值,脚本是可访问的,并且正在执行。e、 g http://localhost/query.php?lat=1.361119&lng=103.828969&rad=2 [Working fine] 我在Wind
http://localhost/query.php?lat=1.361109&lng=103.828969&rad=2 [404]
我得到这个URL的404 Not found错误,同时对于一个参数的稍微不同的值,脚本是可访问的,并且正在执行。e、 g
http://localhost/query.php?lat=1.361119&lng=103.828969&rad=2 [Working fine]
我在Windows上使用Apache2.4。有人能指出这可能是什么原因吗?在我的项目中,我没有在任何地方使用.htaccess。可能服务器端代码会检查数据,并在某些情况下返回404,如下所示:
HttpResponseMessage<Book> GetBook(int id)
{
HttpResponseMessage<Book> result;
var book = _repo.GetBook(id);
if (book != null)
{
result = new HttpResponseMessage<Book>(book);
}
else
{
// 404 error
result = new HttpResponseMessage<Book>(HttpStatusCode.NotFound);
}
return result;
}我在问题中没有提到,但我正在使用PHP。我根本没有重定向到任何404页面。您是否检查来自Get请求的输入?