📄 rewriteguide.html.ko.euc-kr
字号:
<dd> <p>荤侩磊啊 荐玫疙牢 荤捞飘绰 焊烹 权叼泛配府 备炼甫 父电促. 溜, 抗甫 甸绢 捞抚捞 荤侩磊疙狼 霉锅掳 巩磊牢 窍困叼泛配府俊 权叼泛配府甫 敌促. 弊贰辑, <code>/~foo/anypath</code>绰 <code>/home/<strong>f</strong>/foo/.www/anypath</code>捞绊, <code>/~bar/anypath</code>绰 <code>/home/<strong>b</strong>/bar/.www/anypath</code>捞促.</p> </dd> <dt>秦搬氓:</dt> <dd> <p>拱搬钎矫啊 乐绰 URL阑 困客 鞍篮 备炼肺 函券窍扁困秦 促澜 痹蘑阑 荤侩茄促.</p><div class="example"><pre>RewriteEngine onRewriteRule ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*) /home/<strong>$2</strong>/$1/.www$3</pre></div> </dd> </dl> <h3>颇老矫胶袍 犁备己</h3> <dl> <dt>惑炔汲疙:</dt> <dd> <p>捞 抗绰 角肺 窍靛内绢利捞促: 叼泛配府喊 <code>RewriteRules</code>甫 概快 腹捞 荤侩窍咯 磊丰 磊眉绰 弊措肺 敌眉肺 昆俊 磊丰甫 磊楷胶反霸 宏扼快隆窍档废 茄促. 硅版: 唱绰 1992斥 何磐 磊蜡酚霸 荤侩且 荐 乐绰 蜡葱胶 家橇飘傀绢甸阑 <strong><em>net.sw</em></strong>俊 葛酒滴绊 乐菌促. 捞绰 郴啊 哪腔磐苞切阑 傍何窍搁辑 咯矾秦悼救 咯啊矫埃俊 矫胶袍 包府磊客 匙飘亏 包府磊甫 秦吭扁锭巩俊 郴 秒固捞磊 老捞促. 概林付促 货肺 家橇飘傀绢啊 眠啊瞪 锭付促 叼泛配府甫 表霸 父甸绢吭促:</p><div class="example"><pre>drwxrwxr-x 2 netsw users 512 Aug 3 18:39 Audio/drwxrwxr-x 2 netsw users 512 Jul 9 14:37 Benchmark/drwxrwxr-x 12 netsw users 512 Jul 9 00:34 Crypto/drwxrwxr-x 5 netsw users 512 Jul 9 00:41 Database/drwxrwxr-x 4 netsw users 512 Jul 30 19:25 Dicts/drwxrwxr-x 10 netsw users 512 Jul 9 01:54 Graphic/drwxrwxr-x 5 netsw users 512 Jul 9 01:58 Hackers/drwxrwxr-x 8 netsw users 512 Jul 9 03:19 InfoSys/drwxrwxr-x 3 netsw users 512 Jul 9 03:21 Math/drwxrwxr-x 3 netsw users 512 Jul 9 03:24 Misc/drwxrwxr-x 9 netsw users 512 Aug 1 16:33 Network/drwxrwxr-x 2 netsw users 512 Jul 9 05:53 Office/drwxrwxr-x 7 netsw users 512 Jul 9 09:24 SoftEng/drwxrwxr-x 7 netsw users 512 Jul 9 12:17 System/drwxrwxr-x 12 netsw users 512 Aug 3 20:15 Typesetting/drwxrwxr-x 10 netsw users 512 Jul 9 14:08 X11/</pre></div> <p>1996斥 7岿 捞 历厘家甫 岗乐绰 昆 牢磐其捞胶甫 烹秦 技惑俊 傍俺窍扁肺 搬沥寝促. "岗乐促"绰 富篮, 弥惑困 叼泛配府俊 CGI 胶农赋飘甫 滴瘤 臼绊档, 历厘家 拌摸备炼甫 流立 宏扼快龙窍辨 官鄂促绰 舵捞促. 恐? 历厘家甫 唱吝俊 FTP肺档 立辟且 荐 乐档废 父甸 抗沥捞看扁锭巩俊 昆捞唱 CGI客 包访等 郴侩阑 鞍捞 滴扁 饺菌促.</p> </dd> <dt>秦搬氓:</dt> <dd> <p>秦搬氓篮 滴 何盒栏肺 唱炊促: 刚历 叼泛配府 荐霖俊辑 鞘夸茄 葛电 其捞瘤甫 悼利栏肺 父靛绰 CGI 胶农赋飘啊 鞘夸窍促. 唱绰 捞 胶农赋飘甸阑 促澜苞 鞍捞 <code>/e/netsw/.www/</code>俊 滴菌促:</p><div class="example"><pre>-rw-r--r-- 1 netsw users 1318 Aug 1 18:10 .wwwacldrwxr-xr-x 18 netsw users 512 Aug 5 15:51 DATA/-rw-rw-rw- 1 netsw users 372982 Aug 5 16:35 LOGFILE-rw-r--r-- 1 netsw users 659 Aug 4 09:27 TODO-rw-r--r-- 1 netsw users 5697 Aug 1 18:01 netsw-about.html-rwxr-xr-x 1 netsw users 579 Aug 2 10:33 netsw-access.pl-rwxr-xr-x 1 netsw users 1532 Aug 1 17:35 netsw-changes.cgi-rwxr-xr-x 1 netsw users 2866 Aug 5 14:49 netsw-home.cgidrwxr-xr-x 2 netsw users 512 Jul 8 23:47 netsw-img/-rwxr-xr-x 1 netsw users 24050 Aug 5 15:49 netsw-lsdir.cgi-rwxr-xr-x 1 netsw users 1589 Aug 3 18:43 netsw-search.cgi-rwxr-xr-x 1 netsw users 1885 Aug 1 17:41 netsw-tree.cgi-rw-r--r-- 1 netsw users 234 Jul 30 16:35 netsw-unlimit.lst</pre></div> <p><code>DATA/</code> 窍困叼泛配府俊 困俊辑 富茄 历厘家啊 乐促. 角力 <strong><em>net.sw</em></strong>狼 郴侩篮 焊烹 <code>rdist</code>甫 荤侩窍咯 磊悼栏肺 啊廉柯促. 滴锅掳 何盒捞 巢疽促: 绢痘霸 捞 滴 备炼甫 窍唱狼 磊楷胶矾款 URL 备炼肺 楷搬窍绰啊? 荤侩磊俊霸 <code>DATA/</code> 叼泛配府甫 皑眠绊, URL付促 利例茄 CGI 胶农赋飘甫 角青窍绊 酵促. 秦搬氓篮 促澜苞 鞍促: 刚历 辑滚狼 <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>俊辑 傍俺等 URL <code>/net.sw/</code>甫 郴何 版肺 <code>/e/netsw</code>肺 犁累己窍扁困秦 叼泛配府喊 汲沥颇老俊 促澜苞 鞍捞 汲沥茄促:</p><div class="example"><pre>RewriteRule ^net.sw$ net.sw/ [R]RewriteRule ^net.sw/(.*)$ e/netsw/$1</pre></div> <p>霉锅掳 痹蘑篮 付瘤阜俊 浇贰浆啊 绝绰 夸没阑 困秦辑 荤侩沁促! 滴锅掳 痹蘑捞 角力 累诀阑 茄促. 弊府绊 叼泛配府喊 汲沥颇老 <code>/e/netsw/.www/.wwwacl</code>俊 搬沥利牢 汲沥捞 唱柯促:</p><div class="example"><pre>Options ExecCGI FollowSymLinks Includes MultiViewsRewriteEngine on# 菊 何盒捞 /net.sw/ 肺 立辟茄促RewriteBase /net.sw/# 刚历 弥惑困 叼泛配府甫# cgi 胶农赋飘肺 犁累己茄促RewriteRule ^$ netsw-home.cgi [L]RewriteRule ^index\.html$ netsw-home.cgi [L]# 宏扼快历啊 叼泛配府喊 其捞瘤甫 夸没茄 版快# 窍困叼泛配府甫 眠免茄促RewriteRule ^.+/(netsw-[^/]+/.+)$ $1 [L]# 捞力 犁累己阑 付模促RewriteRule ^netsw-home\.cgi.* - [L]RewriteRule ^netsw-changes\.cgi.* - [L]RewriteRule ^netsw-search\.cgi.* - [L]RewriteRule ^netsw-tree\.cgi$ - [L]RewriteRule ^netsw-about\.html$ - [L]RewriteRule ^netsw-img/.*$ - [L]# 促弗 cgi 胶农赋飘啊 贸府且# 窍困叼泛配府啊 巢疽促RewriteRule !^netsw-lsdir\.cgi.* - [C]RewriteRule (.*) netsw-lsdir.cgi/$1</pre></div> <p>秦籍阑 困茄 腮飘:</p> <ol> <li>匙锅掳 何盒俊辑 措眉 鞘靛('<code>-</code>')啊 绝绊 <code>L</code> (last) 敲贰弊啊 乐澜阑 林格窍扼</li> <li>付瘤阜 何盒俊辑 霉锅掳 痹蘑俊 <code>!</code> (not) 巩磊客 <code>C</code> (chain) 敲贰弊甫 林格窍扼</li> <li>付瘤阜 痹蘑俊辑 扁鸥 秦寸窍瘤 臼绰 葛电 版快甫 棱酒郴绰 菩畔阑 林格窍扼</li> </ol> </dd> </dl> <h3>NCSA imagemap阑 酒颇摹 <code>mod_imap</code>栏肺</h3> <dl> <dt>惑炔汲疙:</dt> <dd> <p>荤恩甸篮 NCSA 昆辑滚俊辑 泅措利牢 酒颇摹 昆辑滚肺 磊楷胶反霸 颗败啊辨 官鄂促. 弊贰辑 坷贰等 NCSA <code>imagemap</code> 橇肺弊伐阑 荤侩茄 其捞瘤甫 泅措利牢 酒颇摹 <code class="module"><a href="../mod/mod_imap.html">mod_imap</a></code>肺 贸府窍辨 官鄂促. 巩力绰 <code>imagemap</code> 橇肺弊伐阑 <code>/cgi-bin/imagemap/path/to/page.map</code>苞 鞍捞 曼炼窍绰 窍捞欺傅农啊 腹促绰 巴捞促. 酒颇摹绰 <code>/path/to/page.map</code>苞 鞍篮 夸没阑 罐酒具 茄促.</p> </dd> <dt>秦搬氓:</dt> <dd> <p>葛电 夸没俊辑 菊何盒阑 悼利栏肺 力芭窍绰 傈开 痹蘑阑 荤侩茄促:</p><div class="example"><pre>RewriteEngine onRewriteRule ^/cgi-bin/imagemap(.*) $1 [PT]</pre></div> </dd> </dl> <h3>咯矾 叼泛配府俊辑 其捞瘤 八祸</h3> <dl> <dt>惑炔汲疙:</dt> <dd> <p>啊阐 昆辑滚啊 咯矾 叼泛配府俊辑 颇老阑 茫酒具 且 锭啊 乐促. 捞 版快 MultiViews唱 促弗 规过篮 档框捞 救等促.</p> </dd> <dt>秦搬氓:</dt> <dd> <p>咯矾 叼泛配府俊辑 颇老阑 茫绰 痹蘑阑 流立 橇肺弊伐茄促.</p><div class="example"><pre>RewriteEngine on# 刚历 custom/俊辑 茫辨 矫档窍绊...# ...茫栏搁 场!RewriteCond /your/docroot/<strong>dir1</strong>/%{REQUEST_FILENAME} -fRewriteRule ^(.+) /your/docroot/<strong>dir1</strong>/$1 [L]# 滴锅掳肺 pub/俊辑 茫辨 矫档茄促...# ...茫栏搁 场!RewriteCond /your/docroot/<strong>dir2</strong>/%{REQUEST_FILENAME} -fRewriteRule ^(.+) /your/docroot/<strong>dir2</strong>/$1 [L]# 给茫栏搁 促弗 Alias唱 ScriptAlias 瘤矫绢 殿栏肺 柳青茄促.RewriteRule ^(.+) - [PT]</pre></div> </dd> </dl> <h3>URL俊 蝶扼 券版函荐甫 汲沥茄促</h3> <dl> <dt>惑炔汲疙:</dt> <dd> <p>夸没甸埃俊 惑怕沥焊甫 蜡瘤窍扁困秦 URL俊 沥焊甫 牢内爹窍绰 规过档 乐促. 弊矾唱 窜瘤 捞 沥焊甫 力芭窍扁困秦 葛电 其捞瘤俊 CGI wrapper甫 荤侩窍绊 酵瘤 臼促.</p> </dd> <dt>秦搬氓:</dt> <dd> <p>犁累己 痹蘑阑 荤侩窍咯 惑怕沥焊甫 眠免窍绊, 眠免茄 沥焊甫 唱吝俊 XSSI唱 CGI俊辑 荤侩窍扁困秦 券版函荐俊 历厘茄促. 弊贰辑 URL <code>/foo/S=java/bar/</code>绰 <code>/foo/bar/</code>肺 函券登绊 <code>STATUS</code>扼绰 券版函荐 蔼阑 "java"肺 汲沥茄促.</p><div class="example"><pre>RewriteEngine onRewriteRule ^(.*)/<strong>S=([^/]+)</strong>/(.*) $1/$3 [E=<strong>STATUS:$2</strong>]</pre></div> </dd> </dl> <h3>啊惑 荤侩磊 龋胶飘</h3> <dl> <dt>惑炔汲疙:</dt> <dd> <p>啊惑龋胶飘甫 荤侩窍瘤 臼绊 鞍篮 哪腔磐肺 DNS A 饭内靛甫 汲沥窍咯 <code>www.<strong>username</strong>.host.domain.com</code>阑 荤侩磊狼 权其捞瘤肺 力傍窍绊 酵促.</p> </dd> <dt>秦搬氓:</dt> <dd> <p>HTTP/1.0 夸没狼 版快 规过捞 绝瘤父, Host: HTTP 庆歹甫 器窃茄 HTTP/1.1 夸没篮 促澜 痹蘑阑 荤侩窍咯 郴何利栏肺 <code>http://www.username.host.com/anypath</code>甫 <code>/home/username/anypath</code>肺 犁累己且 荐 乐促:</p><div class="example"><pre>RewriteEngine onRewriteCond %{<strong>HTTP_HOST</strong>} ^www\.<strong>[^.]+</strong>\.host\.com$RewriteRule ^(.+) %{HTTP_HOST}$1 [C]RewriteRule ^www\.<strong>([^.]+)</strong>\.host\.com(.*) /home/<strong>$1</strong>$2</pre></div> </dd> </dl> <h3>权叼泛配府甫 寇何 辑滚肺 府促捞泛记</h3> <dl> <dt>惑炔汲疙:</dt> <dd> <p>瘤开 档皋牢 <code>ourdomain.com</code> 观俊辑 夸没捞 甸绢坷搁 权叼泛配府 URL阑 促弗 昆辑滚 <code>www.somewhere.com</code>栏肺 府促府泛记窍辨 官鄂促. 辆辆 啊惑龋胶飘 荤侩厘家俊辑 荤侩茄促.</p> </dd> <dt>秦搬氓:</dt> <dd> <p>犁累己 炼扒阑 荤侩窍搁 等促:</p><div class="example"><pre>RewriteEngine onRewriteCond %{REMOTE_HOST} <strong>!^.+\.ourdomain\.com$</strong>RewriteRule ^(/~.+) http://www.somewhere.com/$1 [R,L]</pre></div> </dd> </dl> <h3>角菩茄 URL阑 促弗 昆辑滚肺 府促捞泛记</h3> <dl> <dt>惑炔汲疙:</dt> <dd> <p>URL 犁累己俊 措秦辑 昆辑滚 A俊 秦寸 颇老捞 绝绰 版快 昆辑滚 B肺 夸没阑 府促捞泛记窍绰 规过阑 磊林 拱绢夯促. 焊烹 Perl肺 累己茄 <code class="directive"><a href="../mod/core.html#errordocument">ErrorDocument</a></code> CGI 胶农赋飘甫 荤侩窍瘤父, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>甫 荤侩窍绰 规过档 乐促. 弊矾唱 己瓷篮 <code class="directive"><a href="../mod/core.html#errordocument">ErrorDocument</a></code> CGI 胶农赋飘焊促 冻绢咙阑 疙缴窍扼!</p> </dd> <dt>秦搬氓:</dt> <dd> <p>霉锅掳 规过篮 狐福瘤父 蜡楷己捞 冻绢瘤绊 肯傈窍瘤 臼促:</p><div class="example"><pre>RewriteEngine onRewriteCond /your/docroot/%{REQUEST_FILENAME} <strong>!-f</strong>RewriteRule ^(.+) http://<strong>webserverB</strong>.dom/$1</pre></div> <p>捞 规过狼 窜痢篮 <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> 救俊 乐绰 其捞瘤父 啊瓷窍促绰 痢捞促. (抗甫 甸绢 权叼泛配府 殿阑 困秦)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -