Perpetual Object not found error where htaccess file exists
Posted: 29. April 2009 05:37
I have had xampp working fine for quite some time now. Today it was working, and I saved a .htaccess file that in effect password protects a directory, and a .htpasswd file with the required password. After doing that all directories with an htaccess file no longer load the default file (index.php), whereas those directories that do not have an htaccess file load fine. These issues persisted even after deleting the new htaccess and also new htpasswd files. After a bit of research I found that this is the default behavior if mod_autoindex is not installed, but the httpd.conf file in the apache/conf directory says otherwise and this is confirmed by a phpinfo() function call. Any ideas as to what I did and how to fix it would be very helpful. Specific details and a play by play follow:
1. Everything was working fine.
2. I placed this .htaccess file into c:\xampp\htdocs\test_directory\ (note AuthUserFile is not a valid path as this was downloaded from an existing server and was going to be altered to this specific path)
3. I placed this .htpasswd file into c:\xampp\htdocs\
4. I tried to access http://127.0.0.1/test_directory and was prompted to enter a username and password.
5. As I had not yet configured the .htaccess file correctly I canceled out of the password prompt and was greeted with an Object not found error.
6. Now accessing http://127.0.0.1/test_directory returns an Object not found error in firefox.
7. Deleted the new .htaccess and new .htpasswd files
8. Still returns Object not found error.
9. Tried http://127.0.0.1/another_directory and it loads the index.php file
10. Problem eventually tracked to be related to the presence of an .htaccess file in the directory ... if there is one (as in /test_directory) Object not found error is returned, if there isn't one (as in the /another_directory) index.php loads fine.
11. I am able to load http://127.0.0.1/test_directory/index.php fine, and I have been able to verify that the .htaccess file is still being parsed.
1. Everything was working fine.
2. I placed this .htaccess file into c:\xampp\htdocs\test_directory\ (note AuthUserFile is not a valid path as this was downloaded from an existing server and was going to be altered to this specific path)
- Code: Select all
AuthUserFile /usr/www/users/ddrdata/.htpasswd
AuthGroupFile /dev/null
AuthName "DDR Tools"
AuthType Basic
require user admin
3. I placed this .htpasswd file into c:\xampp\htdocs\
- Code: Select all
admin:fr2M8M3pPq5m2
4. I tried to access http://127.0.0.1/test_directory and was prompted to enter a username and password.
5. As I had not yet configured the .htaccess file correctly I canceled out of the password prompt and was greeted with an Object not found error.
6. Now accessing http://127.0.0.1/test_directory returns an Object not found error in firefox.
7. Deleted the new .htaccess and new .htpasswd files
8. Still returns Object not found error.
9. Tried http://127.0.0.1/another_directory and it loads the index.php file
10. Problem eventually tracked to be related to the presence of an .htaccess file in the directory ... if there is one (as in /test_directory) Object not found error is returned, if there isn't one (as in the /another_directory) index.php loads fine.
11. I am able to load http://127.0.0.1/test_directory/index.php fine, and I have been able to verify that the .htaccess file is still being parsed.