I changed index.html to index.php and now the page doesn't load!
It gives me the following message:
The requested URL /cgi-sys/php-cgiwrap/gcadmin/php5.cgi/projects/globalcolleage/index.php was not found on this server.
Any suggestions?
(I'm using WAMP)
I think it has something to do with this hthaccess file:
IndexIgnore *
DirectoryIndex index.html i开发者_JS百科ndex.HTML index.shtml index.cgi index.php index.php3 index.phtml index.htm home.html welcome.html
Action application/x-pair-sphp5 /cgi-sys/php-cgiwrap/gcadmin/php5.cgi
AddType application/x-pair-sphp5 .php
(the file exist: D:\wamp\www\projects\globalcolleage\index.php)
"Not found on this server" normally indicates that you've got an error in your url. Apache isn't finding the requested file. Check your url for typos and check your filename.
Next try a php file which is not an index to see if that works. If normal files work but directory indexes don't, then check your httpd.conf for a line like this:
DirectoryIndex index.html index.php
This tells apache to use index.php for directory index if index.html isn't found.
My bet is a typo in the url since you're getting a file not found error.
Edit:
Since removing the .htaccess file resolved the problem, my guess is that the Action directive was not set up correctly.
http://httpd.apache.org/docs/2.0/mod/mod_actions.html
The Action directive sets a program to handle requests for a particular file type. This is not needed with php in an out-of-the-box setup. You can use php as a cgi binary this way, but it's more complicated than using the apache module.
Firstly, are you sure that file exists? Double check.
Secondly, open up .htaccess
and type this
DirectoryIndex index.html index.php
This tells Apache to first look for index.html
, and if not found, then look for index.php
.
精彩评论