2015-05-18 46 views
0

我在網站上工作的腳本的一個部分值稱爲:錯誤404的獲取參數

http://localhost/query.php?lat=1.361109&lng=103.828969&rad=2 [404] 

我正在404 Not found錯誤此URL,而在同一時間略有不同腳本可訪問和正在執行的參數之一的值。例如

http://localhost/query.php?lat=1.361119&lng=103.828969&rad=2 [Working fine] 

我在Windows上使用Apache 2.4。任何人都可以指出可能的原因嗎?我沒有在我的項目中的任何地方使用.htaccess

回答

0

也許服務器端代碼檢查數據,並在某些情況下,這樣的返回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; 

}

+0

我沒有提到它的問題,但我使用PHP。我根本沒有重定向到任何404頁面。 – aspect

+0

您是否正在檢查來自Get請求的輸入? –