httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Verifying Apapche httpd.conf and other files one piece at a time as requested/
Date Wed, 06 Sep 2006 18:30:22 GMT
On 9/6/06, Leon Sargent <leonsargent@comcast.net> wrote:
> This is the first part of my httpd.conf file.
>
> # First, we configure the "default" to be a very restrictive set of
> # permissions.
> #
> <Directory />
>      Options FollowSymLinks
>      AllowOverride None
> </Directory>
>
> Will this code override this code in my .htaccess file?
>
> AllowOverride AuthConfig
> AuthUserFile lhsmarkets.com/Library/WebServer/Documents/.htpasswd
> AuthGroupFile /dev/null
> AuthName "Password Protected Area"
> AuthType Basic
> Options +FollowSymLinks
> RewriteEngine On
> RewriteBase /Documents/
> RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%
> {QUERY_STRING}
> RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
> RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%
> {QUERY_STRING}

I don't really know what you mean by "override this code".  Setting
AllowOverride to None will indeed turn off processing of .htaccess
files.  But you likely have another AllowOverride directive in a
different part of httpd.conf that turns AllowOverride back on for
certain parts of the filesystem.  So assuming that the directory
containing the .htaccess is covered by an AllowOverride all, then the
.htaccess will be read.

Two other things:
1. You can't put AllowOverride inside an .htaccess.  It makes no sense
to control .htaccess reading from inside an .htaccess file.

2. You should probably just avoid .htaccess entirely.  As the
.htaccess tutorial explains, anything that can be done inside
.htaccess can also be done in a <Directory> section in httpd.conf.  So
just use httpd.conf and everything is simpler (no need to bother with
AllowOverride) and faster (the .htaccess files don't need to be read
on every request).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message