0

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:

hello,

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?

3
  • 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?
    – kzidane
    Commented Jan 20, 2015 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
    Commented Jan 21, 2015 at 21:14
  • I seem to encounter a same kind of problem. Did you manage to fix it? How?
    – Mihaly
    Commented May 19, 2015 at 7:37

0

You must log in to answer this question.

Browse other questions tagged .