Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am attempting to host my website. My host'er is telling me that they dont support "Allow from all" in .htaccess.

Below are the contents of wp-content/.htaccess

Order Allow,Deny
Deny from all
<files  ?\.(jpg|gif|png|js|css)$? ~>
    Allow from all
</files>

What impact negative/positive will I have by removing, just the part lines on my setup ?

share|improve this question
    
Do you need that configuration for anything? –  Shane Madden Jun 28 '12 at 2:46
    
You might get a better response on the WordPress site. –  Nic Jun 28 '12 at 3:08
    
My question got downvoted at wordpress. I was advised to open a question here. I request that I dont get ping ponged between serverfault and wordpress. My question is answered and I am happy. –  Siddharth Jun 28 '12 at 4:17

2 Answers 2

up vote 2 down vote accepted

Since the Allow from all is self contained to only those files you inherently gain/lose nothing. That is one of those things that shouldn't be there as it is literally serving no purpose. You do not have a directive in <Files that is denying, so it's pointless to have it.

The technical reason why that it's pointless is because: https://httpd.apache.org/docs/2.2/howto/access.html

And if I'm wrong it's because of the opposite: it's harder to read, especially in vhost files. If you need to setup ACL you should explicitly define them per <Files rather than attempting to "inherit" previous ACL's.

Also, because it's in .htaccess everything is being denied access to. So, even though you have allow all, the deny rule is applied last. I'd bet that in this case none of your content is visible?

share|improve this answer
    
Super, I'll remove it. –  Siddharth Jun 28 '12 at 4:15
    
I asked a similar question awhile ago serverfault.com/questions/397471/… –  josten Jun 28 '12 at 4:16

I removed all the lines from .htaccess and then it worked. Just removing 'files' wouldn't help.

Order Allow,Deny
Deny from all
<files  ?\.(jpg|gif|png|js|css)$? ~>
    Allow from all
</files>

Thanks to @user973917

share|improve this answer

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.