Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Having a problem with my .htaccess. I have this to secure all my documents:

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

<FilesMatch "\.(htm|html|css|js|php)$">
    Order Allow,Deny
    Allow from all
    Allow from 127.0.0.1
</FilesMatch>

Now everything works fine except that the index page of www.mysite.com doesn't work and gives me the notification:

You don't have permission to access / on this server.

How can you fix this? If there stands www.example.com/index.php it works but if you surf to www.example.com I get this message.

share|improve this question
add comment

1 Answer

You have told Apache to allow for these extensions, but I'd say you didn't tell it to use another default page than index.html. Perhaps you should add something like

DirectoryIndex index.php

to your configuration?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.