开发者

MAMP Returning 404 When URL Too Long

I'm working with a GET request that is about 987 characters long and when I'm developing the application locally (PHP), I am seeing a 404 error even though on my web server, the exact application works just fine.

I'm guessing this is a MAMP specific thing because the same application works on the web server.

Interestingly enough, I'm not getting a 414 (Request URI Too Large), I'm receiving a 404.

Any ideas?

Edit: The apache log says:

[Tue May 31 00:35:27 2011] [error] [client ::1] File does not exist: /Users/tim/Desktop/htdocs/ind开发者_如何学编程ex.php/controller/(restofurl)

The rest of the URL contains no offending characters, simply A-Z.

Again, the same request works on a live server, it's just my local environment that's having the issue.

Edit again: If i make a simple PHP script that prints out all GET variables, http://localhost/test.php?asd=asdasd.......1700chars <--- works fine

However

http://localhost/test.php/asd=asdasd.......1700chars <--- fails

This is quite mysterious..


This looks like your MAMP Server has AcceptPathInfo disabled which is necessary to parse URLs in the

/index.php/something/else

form.

Enable it in your server configuration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜