Kiev1.org Карта сайта Файлы Фотографии Киева
  
Реклама:






???????
 
 Sysadmin
 ??????????????
 ????? ? ?????
 ??????????
 ???????????? ???????
 ?????????????
 ? ???????
 ? ???????????
 ???????? ? ??????
 ???????????
 ??????????? ???????
 ???????? ????? ?????? ?????? ???????? ??????????
 ??????
 ??????
 ?????? ?????? 1924-1994
 ??????? ?? ??????
 ???? ? ???????
 ????? ??????????
 ?????????


Внимание! Читая пророчества на этом сайте помните что достоверность трудно проверить и все может во времени изменяться - самое главное думать своей головой и не верить легкомысленно всему что говорят, особенно советское телевидение
"О дне же том, или часе, никто не знает, ни Ангелы небесные, ни Сын, но только Отец (Мк. 13, 32)"

???????? ?????????? ? ??????? ?????? ? .htaccess



??????? ????????? .htaccess

???????? ?????????? ? ??????? ?????? ? .htaccess

????? ??????? ?? .htaccess
  ??? ???? ?????? .htaccess?
  ??????? ????????? .htaccess
??????????? ??????? ???????? ????????
  ????????? Files
  ????????? FilesMatch
???????????????:
  ????????? Redirect
  ????????? RedirectMatch
  ????????? RewriteCond ? RewriteRule
  ??????: ?????? ????????, ? ??????????? ?? IP ?????? ??????????
  ??????: ?????? ????????, ? ??????????? ?? ??????????? ????????
  ??????????????? ?????????? ??? ??????? ???????????? ???????
??????????? ??????? (l??? ????????? ???????)
  ????????? Order
  ????????? Deny
  ????????? Allow
  ??????: ?????? ?? ?????? ??? ????
  ??????: ?????????? ?? ?????? ??? ???????????? IP ???????
  ??????: ?????? ?? ?????? ??? ???? ?? ??????????? ???????????? IP ???????
  ??????: ?????? ?? ?????? ??? ???????????? ????
  ??????: ?????? ?? ?????? ??? ???????????? ?????? ??????
????????? ??????
  ????????? AuthName
  ????????? AuthType
  ????????? AuthUserFile
  ????????? AuthUserFile
  ??????: ????????? ?????? ?????????? ???? ?????????????.
  ??????: ????????? ?????? ? ?????????? ?????? 3-? ?????????????
  ??????: ??????????? ??????? ? ???????????? ??????
  ??????: ??????????? ??????? ? ?????? ?????
?????????? ????????
  ????????? DirectoryIndex - ????????? ???????? ?? ????????? (?????????)
  ????????? AddOutputFilter - ????????? ??????? (SSI)
  ????????? SetHandler - ????????? ??????????? (PHP, Parser)
  ????????? ErrorDocument - ????????? ??????
??????? htpasswd
??????? ???? .htaccess, ? ?????? ?????? ?????? 500 ??????. ???????
<!----------------------------------------------------------------------------------------------->

??? ???? ?????? .htaccess?

???? .htaccess ????????? ????????????? ??????????? ?????? ???-??????? ??? ?????? ?????. ????? ????????????? ?????? ??? ??????? ? ???????? ??? ????? ?????, ????????????? ????????, ?????????? ?? ????????? ??? ??????? ? ????????, ? ?????? ??????.

?? ?????? ?????????????????? ?????? .htaccess &#151; ?? ?????? ??? ?????? ?????????? ?? ????? ?????.

??? ????????? ? ????? .htaccess ??? ????????????? ???????????? ?????? &#151; ??? ?????? ?? ???????? ???-?? ? ???? ?????, ????????? ??? ?? ???????? ? ????. ???? ???? ?? ?????????? ?????? ? ???? ?????, ?? ??? ????????? ?????? ?? ????? ????? (??? ?? ??? ??? ??????????, ? ??????? ?? ??????????).

???? ???? .htaccess ?????????? ? ???????? ?????????? ???????, ?? ??? ???????? ???????????????? ?? ???? ??????, ????? ??? ??????????, ??? ????????? ?????? ???? .htaccess (? ????? ???? ????? "????" ???? ????? ?? ?????? .htaccess).

????????? ???? .htaccess ???????? ?????????, ?? ?? ?? ???????? ???-???????????? ?? ????????.

??????:

????????? ????? ?????????? ?? ??????? ?????: (????? ?????? ???????? ?????????? ? ??????? ?????? ????????????? ???? .htaccess

/home/st1331/
  |
  +-->
  |   |
  |   +-- .htaccess
  |   |
  |   +-- /www/news/
  |   |   |
  |   |   +-- .htaccess
  |   |   +-- main.html
  |   |   |
  |   |   + /www/news/2003.10/
  |   |   |   |
  |   |   |   + .htaccess
  |   |   |
  |   |   + /www/news/2003.11/
  |   |
  |   +-- /www/data/
  |   |   |
  |   |   +-- .htaccess
  |   |   +-- .htpasswd
  |   |
  |   +-- /www/images/
  |

  +-- /home/st1331/cgi-bin   (??? cgi ????????)
  |
  +-- /log       (?????????)
  |
  +-- /stats     (?????????)


???????? .htaccess ????????????? ???????????????? ?? ??? ????????? ??????????. ????? ??????? ????? ??????????? ????????? ????? .htaccess:

????????????????????? .htaccess
/www/ /www/.htaccess
/www/news/ /www/.htaccess
/www/news/.htaccess
/www/news/2003.10/ /www/.htaccess
/www/news/.htaccess
/www/news/2003.10/.htaccess
/www/news/2003.11/ /www/.htaccess
/www/news/.htaccess
/www/data/ /www/.htaccess
/www/data/.htaccess
/www/images/ /www/.htaccess

??????? ????????? .htaccess

•&nbsp;???? ? ?????? (???????????) ??????????? ?? ????? ???????.

?????????? ??????:

DirectoryIndex /home/st1331/www/data/main.html

??????:

DirectoryIndex /www/news/main.html

•&nbsp;????????? ? ??????????, ????????????? ?? ?????? ?????? ?????? ??????????? ? ????????? ?????????

?????????? ??????:

Redirect /oldsite/ http://www.site.ru/

??????:

Redirect /oldsite/ www.site.ru/

??????????? - ??????, ???????????? ? ??????? #.

? ?????????? ????? ???????????? ?????????? ?????????, ???????? %{REMOTE_ADDR} ??? %{HTTP_REFERER}.

•&nbsp; ???? .htaccess ?????? ???? ??????? ? UNIX-??????? — ??? ???????? ??? ??????? ?????? ?????? ?????????? ? ??? ????? ???????? (0x0A), ? ?? ????? (0x0D 0x0A), ??? ? DOS ??? Windows

<!----------------------------------------------------------------------------------------------->

??????????? ??????? ???????? ????????

????????? Files

?????????: ???????? Files ???????????? ???????? ???????? ????? ??????
Syntax: &lt;Files filename&gt; ... &lt/Files&gt
filename ??? ?????
??????:

&lt;Files my_secure_document.html&gt;

Order Deny,Allow
Deny from all
Allow from 192.168.1.1
&lt;/Files&gt;

????????? FilesMatch

?????????: ???????? Files ???????????? ???????? ???????? ????? ??????
Syntax: &lt;Files regex&gt; ... &lt/Files&gt
regexp: ?????????? ????????? (??????), ??????????? ?????? ??????.
??????:

&lt;FilesMatch ".(gif|jpe?g|png)$"&gt;
Order Allow,Deny
Allow from all
Deny from 192.168.1.1
&lt;/Files&gt;
<!---------------------------------------------------------------------------------------------->

??????????????? (?????????)

????????? Redirect

????????: ????????? ???????? ??????????, ?????????????? ???????? ?? ?????? URL. ????????? ??????? ???????? (??????? ???????? ? ????????????? ????????? ?????? URL).
?????????: Redirect [status] URL-path URL
status: ?????????????? ????, ?????????? ??? ????????, ?????????? ????????: permanent (301 — ???????? ????????? ?????????), temp (302 — ???????? ????????? ????????), seeother (303 — ???????? ??????), gone (410 — ?????).
URL-path: ????????? ????? URL ?????????????? ?????????.
URL: URL ???? ?????? ???? ???????? ????????

Redirect temp /           http://www.iho.ru/newyear.html
Redirect temp /index.html http://www.iho.ru/newyear.html
Redirect permanent /prices2002.html http://www.iho.ru/prices2003.html

????????? RedirectMatch

????????: ????????? ???????? ??????????, ?????????????? ???????? ?? ?????? URL. ????????? ??????? ???????? (??????? ???????? ? ????????????? ????????? ?????? URL). ????????? ?????????? Redirect, ?? ??????????? ????, ??? ?????? ?????? ?????????????? ????????? ??????? ?????????? ????????? (??????)
?????????: Redirect [status] regexp URL
status: ?????????????? ????, ?????????? ??? ????????, ?????????? ????????: permanent (301 — ???????? ????????? ?????????), temp (302 — ???????? ????????? ????????), seeother (303 — ???????? ??????), gone (410 — ?????).
URL-path: ????????? ????? URL ?????????????? ?????????.
regexp: ?????????? ????????? (??????), ??????????? ?????? URL-??.

RedirectMatch (.*).gif$ http://www.myserver.com$1.png
RedirectMatch (.*.jpg)$ http://www.myanother.com$1

??????: ?????? ????????, ? ??????????? ?? IP ?????? ??????????. ? ??????? ?????????? ? ?????? 192.168.1.1 ???????????????? ?? ?????? ????????

RewriteCond %{REMOTE_ADDR} 192.168.1.1
RewriteRule ^/$ /anoter_index_pahe.html [L]

??????: ?????? ????????, ? ??????????? ?? ??????????? ????????. ? ??????? ??????????, ?????????? ?? ???????? http://www.partner.ru/> ?????? /prices.html ???????? /anoter_prices.html

RewriteCond %{HTTP_REFERER} http://www.partner.ru/recep.html
RewriteRule ^/prices.html$ /anoter_prices.html [L]

??????????????? ?????????? ??? ??????? ???????????? ???????:

??? ??? ??? ???? ??????? ??????? ? ????????. ?????? ????? ?????? ? ??????? /_vti_bin ????? ????????????? ???????????????? ?? Microsoft:

redirect /_vti_bin http://www.microsoft.com
redirect /scripts http://www.microsoft.com
redirect /MSADC http://www.microsoft.com
redirect /c http://www.microsoft.com
redirect /d http://www.microsoft.com
redirect /_mem_bin http://www.microsoft.com
redirect /msadc http://www.microsoft.com
RedirectMatch (.*)cmd.exe$ http://www.microsoft.com$1 
<!----------------------------------------------------------------------------------------------->

??????????? ??????? (??????)


????????? Order

????????: ????????????? ??????? ?????? ???????? Deny ? Allow
?????????: Order ???????
??????? ????? ????????? ???????? Deny,Allow ??? Allow,Deny
?? ?????????: Order Deny,Allow

????????? Deny

????????: ????????? ?????? ???????????? ???????? ? ????????.
?????????: Deny from all|host
host ????? ????????? ???????? IP ?????? ??? ????? ?????.

????????? Allow

????????: ????????? ?????? ???????????? ???????? ? ????????.
?????????: Deny from all|host
host ????? ????????? ???????? IP ?????? ??? ????? ?????.

??????: ?????? ?? ?????? ??? ????

Order Deny,Allow
Deny from all

??????: ?????????? ?? ?????? ??? ???????????? IP ???????

Order Deny,Allow
Deny from all
Allow from .iho.ru
Allow from 192.168.1.1

??????: ?????? ?? ?????? ??? ???? ?? ??????????? ???????????? IP ???????

Order Allow,Deny
Allow from all
Deny from .iho.ru
Deny from 192.168.1.1

??????: ?????? ?? ?????? ??? ???????????? ????. ? ??????? ??????????? ?????? ? ????? .htpasswd ??? ???? ???????????

&lt;Files ".htpasswd"&gt;
Order Deny,Allow
Deny from all
&lt;/Files&gt;

??????: ?????? ?? ?????? ??? ???????????? ?????? ??????. ? ??????? ??????????? ?????? ? ?????? ? ???????????? "lib" ? "pm" ??? ???? ???????????

&lt;FilesMatch  ".(lib|pm)$"&gt;
Order Deny,Allow
Deny from all

&lt;/FilesMatch&gt;
<!---------------------------------------------------------------------------------------------->

????????? ?????? ?? ??????


????????? AuthName

????????: ???????? AuthName ????? ?????????? ??? ?????????? ? ????? ?????????????? ??? ????????? ??????? ???????????.

????????? AuthType

????????: ??? ????????? ???????? ??? ??????????????. ???????? ????????? ????: Basic and Digest.
?????????: AuthType Basic|Digest

????????? AuthUserFile

????????: ???????? AuthUserFile ????????? ??? ????? ? ???????? ??? ?????????????? ?????????????. ???? ? ???????? ????? ???? ??????? ???????? htpasswd. ???? ? ????? ? ???????? ???????? ???????????? ????? ???-???????. ??????? ???? ? ???????? ? ?????, ?????? ? ??????? ?????? ??? ?????????????..
?????????: AuthUserFile ????-?-?????

????????? Require

????????: ?????????? ?????????????, ??????? ????? ???????? ??????
?????????: Require ???-????????????|valid-user
???????? valid-user ?? ?????????? ?????? ???? ?????????????, ????????????? ? ????? ???????.

??????: ????????? ?????? ?????????? ???? ?????????????:

AuthName "Restricted area"
AuthType Basic
AuthUserFile /home/st1331/www/data/.htpasswd
Require valid-user

??????: ????????? ?????? ? ?????????? ?????? 3-? ?????????????:

AuthName "Very restricted area"
AuthType Basic
AuthUserFile /home/st1331/www/data/.htpasswd
Require antonio solo marina

??????: ??????????? ??????? ? ???????????? ?????? (? ???? ??????? ????????? ?????? ? zip ???????)

&lt;FilesMatch ".zip$"&gt;
AuthName "Only valid users can download zip files."
AuthType Basic
AuthUserFile /home/st1331/www/data/.htpasswd
Require valid-user
&lt;/FilesMatch&gt;

??????: ??????????? ??????? ? ?????? ????? (? ???? ??????? ????????? ?????? ? ????? .htpasswd)

&lt;Files ".htpasswd"&gt;
AuthName "Access restricted."
AuthType Basic
AuthUserFile /home/st1331/www/data/.htpasswd
Require antonio solo

&lt;/Files&gt;
<!----------------------------------------------------------------------------------------------->

?????????? ????????

????????? DirectoryIndex - ????????? ???????? ?? ????????? (?????????)

????????: ????????? ???????? ????????, ??????? ????? ???????????? ??? ????????? ? ??????????
?????????: DirectoryIndex page [page]
page - ???????? ????????? ????????. ????? ???? ??????? ????????? ???????.
??????:

DirectoryIndex main.html index.php test.shtml

????????? ErrorDocument - ????????? ??????

????????: ????????? ????????????? ?????????????? ???????? ??????
?????????: ErrorDocument code URL-path
URL-path - ????????? ????? ????????
code - ??? ??????. ???????? ???????? ???? ???????:
401 &#151; ????????? ??????????? (Authorization Required)
403 &#151; ???????????? ?? ?????? ??????????????, ?????? ?? ?????? (Forbided)
404 &#151; ????????????? ???????? (????, ??????????) ?? ?????? (Not Found)
500 &#151; ?????????? ?????? ??????? &#151; ?????? ??????? ??? ?????? ? ?????????? ????? .htaccess - (Internal Server Error)


ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html

????????? AddOutputFilter - ????????? ??????? (SSI)

&lt;FilesMatch ".(mytype)$"&gt;
  SetOutputFilter INCLUDES
&lt;/Directory&gt; 

????????? SetHandler - ????????? ??????????? (PHP, Parser)

????????: ????????????? ?????????? ??? ?????? ? ???????? ??????????
?????????: SetHandler handler-name

SetHandler php-script

????????? AddHandler - ????????? ??????????? (PHP, Parser)

????????: ????????????? ?????????? ??? ?????? ?????????? ????
?????????: AddHandler handler-name filename-extension

AddHandler php-script .html
AddHandler parser-script .htm

????????? AddDefaultCharset - ????????? ??????????? (PHP, Parser)

?? ????????? ?? ??????? ??????????? ????????? Windows-1251

AddDefaultCharset koi8-r
<!---------------------------------------------------------------------------------------------->

??? ????????? ???? ???????????? SSI ??????????

SSI ????????? "????????" ???????? ?? ????????. ? ????? ??????? ? ??? ??? ????, ? ?????? ??? ??????? ????? ????????, ? ??????? - ??????. ? ?????????? ????? ??????? ????????, ??????? ??????? ?? ???? ????, ??????? ?????? ? ???? ???????. ?????????? ???????????? ????????? ? httpd.conf: ? ?????, ???????????? ? &lt;Directory/&gt; ? ??????????????? &lt;/Directory&gt; ? ?????? Options Indexes ???????? Includes. ?????, ? ????? .htaccess ?????:

AddOutputFilter Includes .html .htm

??? ????????? ?????? ?? ??????????? ??????????? ?????????? ??? ?????????? ?????????? ??????

???????????, ??? ? ??? ??? ???????, ???????????? ?? ????? ????????? ? ?????????? img. ?????????? ????? ??????? ? ???????? ?????? ???????? ??? ?????????? ? ??????? ?????? ???? ????? ??????????? ??????. ???????, ??? ?? ??????? ??? ?????, ?? ????? ? ?? ???? ?????? ????????? ??????????. ? .htaccess ?????:

<!----------------------------------------------------------------------------------------------->

htpasswd

????????? htpasswd ?????? ??? ???????? ????? ? ????????, ??????? ????? ???? ??????????? ??? ?????????????? ????????????? ???-????????.

??????: ???????? ????? ? ???????? ? ?????????? ? ???? 1 ?????:

htpasswd -c Filename username 

??????: ?????????? ??? ????????? ????? ? ????????

htpasswd Filename username2 
<!---------------------------------------------------------------------------------------------->

??????? ???? .htaccess, ? ?????? ?????? ?????? 500 ??????. ???????

500-? ?????? ????? ???? ??????? ?????????? ?????????:
1. ???????? ????????? .htaccess
2. ???? .htaccess ??????? ? ??????? Windows, ? ?????? ???? ??????? ? ??????? UNIX

????????
??????? ? htaccess

base (100&nbsp;??)
standard (250&nbsp;??)
optima (300&nbsp;??)
profi (400&nbsp;??)
elite (500&nbsp;??)
extreme (700&nbsp;??)

????????? ?????


&nbsp;
Copyright 2002-2004 IHO networks  http://www.iho.ru




 ??????????? ?? URL ???????????????
 ?????? Apache ? chroot ?????????
 ?????? Apache ? jail environment ??? FreeBSD


Внимание! Читая пророчества на этом сайте помните что достоверность трудно проверить и все может во времени изменяться
"О дне же том, или часе, никто не знает, ни Ангелы небесные, ни Сын, но только Отец (Мк. 13, 32)"