homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

AllowOverride None

Msg#: 4403151 posted 12:49 pm on Jan 3, 2012 (gmt 0)

Before I go ahead and try and implement this, what is the correct use of “AllowOverride None”?

I picked up a text book over the holidays which suggests that “AllowOverride None” should be in the main root htaccess file to improve performance and then use a <Directory> directive, again in the main root htaccess to allow other directories.

If nothing filters down from the root (where most of the configurations are) unless overridden with a <Directory> directive this would mean (for me) every Directory would need to be separately enabled?

For example, the server I am testing on has the default set as “AllowOverride All”. If I change this to “None”, I immediately lose configurations such as Options –Indexes for sub-directories which now have a folder index rather than their DirectoryIndex page?

As a general rule is it not the best principal to put as much as possible in the root htaccess? No doubt I misunderstand the use of this but I would be grateful for some feedback.




WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4403151 posted 10:20 pm on Jan 3, 2012 (gmt 0)

I always prefer to go to the horse's mouth. For Apache, that's:


(fragment link "allowoverride" will be eaten by the Forums, but it's near the top). Your options-- haha-- are not limited to "All" or "None". You can list Override permissions individually.

If it's your own server, then you should be putting everything possible in the config file. Will the directories also belong to you? If so, there's no reason to change from "All". Restrictions only become necessary when some directories are used by other people and you don't want them doing things that will slow down the whole server or potentially create a big mess.


Msg#: 4403151 posted 9:06 am on Jan 4, 2012 (gmt 0)

Thanks Lucy.

I did eventually go to the official documentation. My post demonstrates how little I know about this. As I understand it now, you can only do what the book suggests if you have control of the config file and the ”AllowOverride” setting can’t be made in htaccess? When the time comes I expect to be on a shared server, at least to start with, so presumably I won’t have control of the config file and the default will be set as “All”?

My attention was drawn by the comment in the book that the server has to look through every Directory on the path to a given file to see if there is an htaccess file present. I was hoping to lighten the load.

Is it possible with htaccess to do per Directory directives so that everything is in the root htaccess or is this only possible in the config file?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved