Apache not finding index.php by default
I'm getting the following message when I'm trying to go to this url: example.com/couch/
The requested URL /couch/.php was not found on this server.
Notice that it just says .php instead of index.php. I already have index.php at the top of the directory index (image below) and there is an index.php file in the directory.
- Removed please attach images to your posts -
I've also added the following to my root directory's .htaccess file:
DirectoryIndex index.php
And, going directly to example.com/couch/index.php brings me to the correct page.
Does anyone have an idea of what I'm missing?
Thanks!
-
Hello :) Are there any additional entries in this .htaccess file, or any additional entries in .htaccess files in parent directories? Thank you. 0 -
Hi Michael, Here is my entire .htaccess file. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] DirectoryIndex index.php This file is in the /home/username/public_html directory and there are no .htaccess files above the public_html directory. Thanks! 0 -
Could you temporarily remove those Mod_Rewrite rules, and test loading the page in a different browser or after clearing the cache in the existing browser? Thank you. 0 -
Hi Michael, It turns out another developer added an .htaccess file that fixed the issue so I can't troubleshoot this any further. You can close the ticket. Thanks. 0 -
I am happy to see the issue is now resolved. Thank you for updating this thread with the outcome. 0
Please sign in to leave a comment.
Comments
5 comments