Although the spec does not mention to handle .php files, I found that if I do not have my lookup function return "text/html" when it receives a .php extension, then I get a 501 Not Implemented error. After fixing this, I can now go to hello.html, type in a name, and send it off, and hello.php opens, but all it says is:


my variable query is holding "name=Michael", and yet the pre-loaded code does not seem to send off that string correctly. I tried it with the query holding the ? but that did me no good. I even tried having the query only hold the name itself, not name= but that broke it further.

Is anyone else having issues getting hello.php to work? What is my query string supposed to look like?

  • Your lookup function is not supposed to return text/html when the extension is php. In fact it is not even used when the extension is php. The support for php files is done for you in the distribution code. So after reverting back what you did, are there any error messages that are thrown by the server when it responds with 501? – Kareem Jan 20 '15 at 10:44
  • My server responds with just the "HTTP/1.1 501 Not Implemented". The browser network panel says the same. I tracked down the 501 error, and apparently it wasn't hitting the dynamic content if statement. Thanks to your comment I have tracked down the issue. My extension variable is holding ".php" but the if statement just asks for "php" so the strings did not match – Michael F Jan 21 '15 at 21:14
  • I seem to encounter a same kind of problem. Did you manage to fix it? How? – Mihaly May 19 '15 at 7:37

You must log in to answer this question.

Browse other questions tagged .