Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change 
notification.

The following page has been changed by pctony:
http://wiki.apache.org/httpd/ScratchPad/htaccess

The comment on the change is:
updated

------------------------------------------------------------------------------
  
  Not really; .htaccess files '''''can''''' be used to provide password 
protection the same way the main configuration files can be used to provide 
password protection; there is nothing special about .htaccess for this purpose.
  
- === It must be called .htaccess ===
+ === Does it have to be called .htaccess ===
  
- Nope, you can define its name through the 
[http://httpd.apache.org/docs/2.0/mod/core.html#accessfilename AccessFileName] 
directive. It isn't recommended practice, though, specially if you'll provide 
shared hosting or something like that were
+ Nope, you can define its name through the 
[http://httpd.apache.org/docs/2.0/mod/core.html#accessfilename AccessFileName] 
directive. It isn't recommended practice, though, especially if you'll provide 
shared hosting or something similar where unknown people will have web space 
and expect .htaccess files to be supported.
- unknown people will have web space and expect .htaccess files to be supported.
  
- == When should I (not) use .htaccess files? ==
+ == When should I, and should I not use .htaccess files? ==
  
  === Should use ===
  .htaccess files should really only be used when you cannot directly edit the 
main configuration files!
@@ -46, +45 @@

  
  == What can I do with my .htaccess file? ==
  
- .htaccess files are containers for subset of Apache directives. .htaccess 
files apply only to the directory they're placed in and all its descendants.
+ .htaccess files are containers for subset of Apache directives. .htaccess 
files apply only to the directory that they are placed in and all its 
descendants.
  
  This means you can think of .htaccess files as dynamically adding the 
following to the master Apache configuration:
   
@@ -76, +75 @@

  
  To check what directives Apache supports in .htaccess files, find the 
directive you would like to use in a .htaccess file in the documentation and 
check out the "Context:" section. If it says .htaccess, then that directive is 
valid in .htaccess, although it could have been disabled by the administrator, 
of course.
  
- Ok, ok an example. Let's suppose you really must use .htaccess files; and 
that you want to password protect the site we talked about above, located at 
/var/www/html/www.example.com/admin. A .htaccess file for that task should look 
like:
+ Ok, an example. Let's suppose you really must use .htaccess files; and that 
you want to password protect the site we talked about above, located at 
/var/www/html/www.example.com/admin. A .htaccess file for that task should look 
like:
  
  '''/var/www/html/www.example.com/admin/.htaccess'''
  {{{
@@ -104, +103 @@

  Include /usr/local/apache2/conf/vhosts-protection/*.conf
  }}}
  
- '''/usr/local/apache2/conf/vhosts-protection/www.example1.com.conf'''
+ '''/usr/local/apache2/conf/vhosts-protection/www.example.com.conf'''
  {{{
- <Directory /var/www/html/www.example1.com> 
+ <Directory /var/www/html/www.example.com> 
    AuthType Basic
    AuthName "Authentication Required"
    #Change the following to either a single file for all domains or to a 
different naming scheme if you like

Reply via email to