. : http://www.arcetri.astro.it/manual/ja/howto/htaccess.html
: Mon Jan 21 19:44:30 2013
: Fri Feb 28 06:09:53 2014
: IBM-866
Apache î: .htaccess - Apache HTTP ²î
<-
Apache > HTTP ²î > Áî§Á > î¦Á 2.2 > How-To / î

Apache î: .htaccess

í ۇ֐ˑ

.htaccess ۇֵ

top

.htaccess

top

.htaccess /ֵ

.htaccess () ۇֵ ۦ ²

:

.htaccess AccessFileName ۇ .config ²î :

AccessFileName .config

.htaccess ۦ AllowOverride .htaccess ۦ ‡î .htaccess ۦ ۦۦ.htaccess ۦ AllowOverride

AddDefaultCharset .htaccess (Áµۦ ) ۦۦ FileInfo .htaccess ʵ AllowOverride FileInfo

:

Áµ: ²î,îµ,,.htaccess
ۦ: FileInfo

.htaccess ۦ ".htaccess" Áµ

top

.htaccess ()

²î¨µ .htaccess î´ .htaccess î´²îۦ ֵֵ

.htaccess ÁÁ ²î§µ root ¨µ ²îۇ î´ .htaccess ۇֵ ɵISP Րî´²§Áµ î´ۇ

í .htaccess .htaccess ۦ ²î <Directory> ¨§Á

.htaccess ԑ

²îíAllowOverride .htaccess Apache .htaccess .htaccess í! .htaccess ۦµ

Apache .htaccess (ֵ )/www/htdocs/example µApache

/.htaccess
/www/.htaccess
/www/htdocs/.htaccess
/www/htdocs/example/.htaccess

¨µ §µ ¨µ(.htaccess / ʵ )

¨î´²îۇ ۇ î´ɵ î´ ²îí î´ AllowOverride ۦ

ۦ .htaccess /www/htdocs/example ²î Directory ¨§Á <Directory /www/htdocs/example> ۦ :

/www/htdocs/example .htaccess :

/www/htdocs/example .htaccess

AddType text/example .exm

httpd.conf ¨§Á file

<Directory /www/htdocs/example>
AddType text/example .exm
</Directory>

²îۦֵîÁµ µ Apache 1

AllowOverride none .htaccess ʵ

AllowOverride None

top

ֵ

.htaccess .htaccess ² .htaccess Ϭ .htaccess î .htaccess ۦ .htaccess ۦۦ²î ۦ

:

/www/htdocs/example1 .htaccess :

Options +ExecCGI

(: .htaccess "Options" ʵ "AllowOverride Options" ʵ)

/www/htdocs/example1/example2 .htaccess :

Options Includes

.htaccess /www/htdocs/example1/example2 CGI Options Includes ʵۦ

Á .htaccess î¦

As discussed in the documentation on Configuration Sections, .htaccess files can override the <Directory> sections for the corresponding directory, but will be overriden by other types of configuration sections from the main configuration files. This fact can be used to enforce certain configurations, even in the presence of a liberal AllowOverride setting. For example, to prevent script execution while allowing anything else to be set in .htaccess you can use:

¨§Á .htaccess <Directory> ¨§Áۦ Á¨§Á ۦ ɵ AllowOverride ԑɵ CGI µ .htaccess :

<Directory />
Allowoverride All
</Directory>

<Location />
Options +IncludesNoExec -ExecCGI
</Location>

top

ֵۇ µî .htaccess ²î <Directory> ¨§Á ۦֵֵ.htaccess ²îۇ .htaccess

.htaccess

.htaccess :

AuthType Basic
AuthName "Password Required"
AuthUserFile /www/passwords/password.file
AuthGroupFile /www/passwords/group.file
Require Group admins

ʵ AllowOverride AuthConfig ʵ

Ƀ î

top

SSI

.htaccess ɵ SSI ʵ .htaccess ۦ :

Options +Includes
AddType text/html shtml
AddHandler server-parsed shtml

ʵ AllowOverride Options AllowOverride FileInfo ʵ

SSI SSI î

top

CGI

ɵ CGI  :

Options +ExecCGI
AddHandler cgi-script cgi pl

CGI  Ϭ:

Options +ExecCGI
SetHandler cgi-script

ʵ AllowOverride Options AllowOverride FileInfo ʵ

CGI  CGI î

top

.htaccess ۦ ʵ

AllowOverride µî AllowOverride None ֵ .htaccess ۦî ²îî AllowOverride None ʴ

ۦ¨µî١ Apache î.htaccess í

:  en  |  fr  |  ja  |  ko  |  pt-br 

top

Á

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.