Weird query: "equal slash id" (=/id) gives weird error: 501
This is the weirdest problem of my life, and can't even Google it. It's happening on an Apache powered website written in PHP, which uses mod_rewrite (but that's not the issue, I tried removing the .htaccess file, problem still exists).
If I have a query string that looks exactly or similar to: =/id
I get an 501 response:
Method Not Implemented
GET to / not supported.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I never written such error page, never sent an 501 response, don't have the slightest clue where this thing is coming from. Originally I had a long URL giving me a similar error, but I stripped down to this little snippet above. If I remove or change any character, the error's gone.
If that helps: my website is commentards.net, and the original URL was an openid login request which looks like this:
http://commentards.net/q/user/auth?openid_identifier=https://www.google.com/accounts/o8/id
from which the query string is:
开发者_开发技巧?openid_identifier=https://www.google.com/accounts/o8/Fid
I asked the support team, and they said it was mod_security, and disabled it for my website. And now it works fine. I should have started with that. Anyway, thanks for your help.
Urlencode your query string parameter(s).
https://www.google.com/accounts/o8/id becomes https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2FFid
http://commentards.net/q/user/auth?openid_identifier=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2FFid works fine, so HerrSerker already answered your question.
精彩评论