Xampp, Access forbidden for non index files
Question
I've been using xampp for a long time and it's always worked fine. I have a project I am currently working on and it was working fine just a couple of days ago. Now I am getting 403 Access forbidden page for any file that is not named index.php. Anyone have any ideas why this might be happening.
I'm on Windows XP and have Xampp Version 1.6.4 installed.
Solution
My first guess would be an issue with the .htaccess file (or httpd.conf file).
Something to keep in mind:
The way that Apache handles .htaccess rules is "cascading" meaning that it will check every .htaccess file along the path of the file you are trying to access, so if you have some rule forbidding users from viewing any non-index files at any point, it will affect all deeper directories.
Having said that, if you know the issue isn't with the httpd.conf
file, check to see if the root of the publishing path has a .htaccess
file. Change it to .htaccessold
and see if you can access any files in the htdocs directory other than index.
Two questions:
- Do you get this for all files, or just php files? can you see image files, etc?
- What about index.html? If you change your
index.php
totempindex.php
and create a new blah file calledindex.html
can you see that?
Good luck. Keep me posted.
OTHER TIPS
The only way you can see why Apache is returning this error message is to look at the error log.
We can guess at possible causes, but Apache will be able to tell you if you take the time to look.
It sounds like you changed some mod_rewrite
rules or your site's apache configuration. Did you add or change anything in an .htaccess
file?
You're probably going to have to give more details in order to figure this out.