1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
|
<?xml version="1.0" encoding="EUC-JP"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<title>ƥȥͥ - Apache HTTP </title>
<link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
<link href="./images/favicon.ico" rel="shortcut icon" /></head>
<body id="manual-page"><div id="page-header">
<p class="menu"><a href="./mod/">⥸塼</a> | <a href="./mod/directives.html">ǥ쥯ƥ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Ѹ</a> | <a href="./sitemap.html">ȥޥå</a></p>
<p class="apache">Apache HTTP С 2.2</p>
<img alt="" src="./images/feather.gif" /></div>
<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP </a> > <a href="http://httpd.apache.org/docs/">ɥơ</a> > <a href="./">С 2.2</a></div><div id="page-content"><div id="preamble"><h1>ƥȥͥ</h1>
<div class="toplang">
<p><span>Available Languages: </span><a href="./en/content-negotiation.html" hreflang="en" rel="alternate" title="English"> en </a> |
<a href="./ja/content-negotiation.html" title="Japanese"> ja </a> |
<a href="./ko/content-negotiation.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div>
<div class="outofdate">This translation may be out of date. Check the
English version for recent changes.</div>
<p>Apache HTTP/1.1 εʤ˵ҤƤ륳ƥȥͥ
ݡȤƤޤ
֥饦ˤ줿ǥס
졢ʸåȡǥͥ跹˴Ťơ
ŬʥɽǤޤ
ޤԴʥͥäƤ֥饦ΥꥯȤ
äȸ갷褦ĤǽƤޤ</p>
<p>ƥȥͥ
<code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code>
⥸塼ˤäƤơǥեȤȤ߹ޤƤޤ</p>
</div>
<div id="quickview"><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#about">ƥȥͥˤĤ</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#negotiation">Apache ˤͥ</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#methods">ͥˡ</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#better">ʼͤѤ</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#extensions">Transparent Content Negotiation
γĥ</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#naming">̾Ѵ˴ؤ</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#caching">å˴ؤջ</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#more">ɲþ</a></li>
</ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="about" id="about">ƥȥͥˤĤ</a></h2>
<p>ϡĤۤʤäɽѤǤ礬ޤ
㤨Сۤʤۤʤǥס
ޤϤȤ߹碌ѤǤ뤫Τޤ
äȤŬˡΰĤˤϡǥåڡ
桼˸ơ桼Ǥ餦ˡޤ
ФưŪ֤ȤǤ礬¿ޤ
ϡ֥饦ꥯˡ
ɤɽϹ뤫Ȥ뤳ȤưƤޤ
㤨Х֥饦ϡǽʤեǾ
Բǽʤ餽˱ѸǤ褤ȡ
ʬϹΤ餻뤳ȤǤޤ
֥饦ϥꥯȤΥإåǼʬͥ跹Τ餻ޤ
եΤߤɽ᤹ϡ֥饦ϼޤ</p>
<div class="example"><p><code>Accept-Language: fr</code></p></div>
<p>ͥ跹ϡǽɽ¸ߤơ
ˤä͡ɽˤΤŬѤ
ȤȤդƤ</p>
<p>äʣʥꥯȤޤ礦
Υ֥饦ϥեȱѸդ롢եࡢ
͡ʥǥפդ뤬
ץ쥤ƥȤ¾Υפ HTML ࡢ
¾Υǥפ GIF JPEG ࡢǽʤȤ
¾Υǥפդ롢ꤵƤޤ</p>
<div class="example"><p><code>
Accept-Language: fr; q=1.0, en; q=0.5<br />
Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6, image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
</code></p></div>
<p>Apache HTTP/1.1 ʤƤ 'server
driven' ƥȥͥݡȤƤޤ
<code>Accept</code>, <code>Accept-Language</code>,
<code>Accept-Charset</code>, <code>Accept-Encoding</code>
ꥯȥإå˥ݡȤƤޤApache
'transparent' ƥȥͥ⥵ݡȤƤޤ
RFC 2295 RFC 2296 ƤŪ
ͥץȥǤ
RFCƤ 'feature negotiation'
ϥݡȤƤޤ</p>
<p><strong></strong>Ȥ URI
ꤵ복ǰΤΤΤȤǤ (RFC 2396) Apache
Τ褦 HTTP Фϡ֤̾Ǥ
<strong>ɽ</strong>ؤΥޤ
줾ɽ
줿ǥסʸåȡǥ
°ХηǤ
줾ΥϤ 0 ġ1 ġʾɽ
ϢդǽޤʣɽѤǤϡ
<strong>ͥǽǤ</strong>Ȥ졢
ġɽ <strong>variant</strong> ȸƤФޤ
ͥǽʥ variant ۤʤ롢
ξ֤ؤơ
ͥ<strong></strong>ȸƤӤޤ</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="negotiation" id="negotiation">Apache ˤͥ</a></h2>
<p>ͥ뤿ˤϡ
Ф variant 줾ˤĤƤξΤäƤɬפޤ
ϰʲĤˡΤɤ餫ǹԤޤ</p>
<ul>
<li>ץޥå
(<em>ʤ</em> <code>*.var</code> ե)
Ȥˡ variant
Ū˵Ƥեꤷޤ</li>
<li>'Multiviews'
ȤäơФۤ˥ե̾˥ѥȹ
ԤʤäƤη̤ˡ</li>
</ul>
<h3><a name="type-map" id="type-map">type-map եȤ</a></h3>
<p>ץޥåפ <code>type-map</code> ϥɥ
(⤷ϡŤ Apache
Ȳ̸ߴǤ <a class="glossarylink" href="./glossary.html#mime-type" title="Ѹ콸">MIME </a>
<code>application/x-type-map</code>)
˴Ϣդ줿ɥȤǤ
εǽȤˤϡեγĥҤ
<code>type-map</code>
Ȥ褦ʥϥɥ
ե֤ɬפ뤳ȤդƤ
</p>
<div class="example"><p><code>AddHandler type-map .var</code></p></div>
<p>ե˽ȤɤˡǤ</p>
<p>ץޥåץեϵҤƱ̾äƤơ
Ѳǽ variant 줾ΥȥäƤɬפޤ
ơΥȥϢ³ HTTP ΥإåԤǹޤ
ۤʤ variant ΤΥȥ϶ԤǶڤƤޤ
ȥ˶ԤʣäƤϤޤ
ŪˤϡޥåץեΤ礷ΤΥȥ꤫Ϥޤޤ
(ɬܤǤϤʤäȤƤ̵뤵ΤǤ)
ޤΥեϥ <code>foo</code>
ҤƤΤǡ<code>foo.var</code> Ȥ̾ˤʤޤ</p>
<div class="example"><p><code>
URI: foo<br />
<br />
URI: foo.en.html<br />
Content-type: text/html<br />
Content-language: en<br />
<br />
URI: foo.fr.de.html<br />
Content-type: text/html;charset=iso-8859-2<br />
Content-language: fr, de<br />
</code></p></div>
<p>Ȥ MultiViews Ѥ褦ˤʤäƤȤƤ⡢
ե̾γĥҤץޥåפͥ踢ĤȤȤˤ
դƤ
variant ʼ㤦ȤϡβΤ褦 (JPEG, GIF, ASCII
Ȥޤ) ǥפ "qs"
ѥǻꤵޤ</p>
<div class="example"><p><code>
URI: foo<br />
<br />
URI: foo.jpeg<br />
Content-type: image/jpeg; qs=0.8<br />
<br />
URI: foo.gif<br />
Content-type: image/gif; qs=0.5<br />
<br />
URI: foo.txt<br />
Content-type: text/plain; qs=0.01<br />
</code></p></div>
<p>qs ͤϰϤ 0.000 1.000 Ǥqs ͤ
0.000 variant Ϸ褷
ʤȤդƤ'qs' ͤΤʤ variant
qs 1.0 Ϳޤqs
ѥϥ饤ȤǽϤ˴ط̵¾ variant
ӤȤ variant
Ūʡʼפޤ
㤨С̿ɽ褦ȤƤȤ JPEG
ե̤ ASCII
ե⤤ʼˤʤޤ
ASCII ȤɽƤȤϡASCII ե
JPEG ե⤤ʼˤʤޤΤ褦ˡqs
ɽˤä variant
ͭͤޤ</p>
<p>ǧإåΰ
<a href="mod/mod_negotiation.html#typemaps">mod_negotiation</a>
ɥȤˤޤ</p>
<h3><a name="multiviews" id="multiviews">Multiviews</a></h3>
<p><code>MultiViews</code> ϥǥ쥯ȥΥץǡ
<code>httpd.conf</code>ե
<code class="directive"><a href="./mod/core.html#directory"><Directory></a></code>,
<code class="directive"><a href="./mod/core.html#location"><Location></a></code>,
<code class="directive"><a href="./mod/core.html#files"><Files></a></code>
䡢(<code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code>
Ŭڤͤ ꤵƤ) <code>.htaccess</code>
ե <code class="directive"><a href="./mod/core.html#options">Options</a></code>
ǥ쥯ƥ֤ˤäꤹ뤳ȤǤޤ
<code>Options All</code>
<code>MultiViews</code>
åȤʤȤդƤŪ
̾ɬפޤ</p>
<p><code>MultiViews</code> θ̤ϰʲΤ褦ˤʤޤ:
Ф <code>/some/dir/foo</code>
ؤΥꥯȤꡢ<code>/some/dir</code>
<code>MultiViews</code> ͭǤäơ
<code>/some/dir/foo</code> ¸<em>ʤ</em>硢
Фϥǥ쥯ȥɤ <code>foo.*</code>
ˤƤϤޤƤΥեõ
¾夽Υեޥåפ륿ץޥåפޤ
ΤȤǥפȥƥȥǥϡΥե̾
ľܻꤷȤƱΤƤޤ
줫饯饤Ȥ˰ֹ礦ΤӤޤ</p>
<p>Фǥ쥯ȥκȤƤ硢
<code>MultiViews</code>
<code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
ǥ쥯ƥ֤ǻꤵ줿եõˤ
ŬѤޤե</p>
<div class="example"><p><code>DirectoryIndex index</code></p></div>
<p>Ƥơ<code>index.html</code>
<code>index.html3</code>
ξ¸ߤƤȡФϤ椫ɤ餫ŬӤޤ
⤷ξ¸ߤ <code>index.cgi</code>
¸ߤƤȡ ФϤ¹Ԥޤ</p>
<p>⤷ǥ쥯ȥɤǤݤˡ
ʸåȡƥȥס졢ǥ
ꤹ뤿 <code>mod_mime</code>
ǧǤĥҤʤե뤬Ĥȡ̤
<code class="directive"><a href="./mod/mod_mime.html#multiviewsmatch">MultiViewsMatch</a></code>
ǥ쥯ƥ֤˰¸ޤΥǥ쥯ƥ֤
ϥɥ顢ե륿¾ΥեĥҥפΤɤ줬
MultiViews ͥǻѤǤ뤫ꤷޤ</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="methods" id="methods">ͥˡ</a></h2>
<p>Apache ϥ variant ΰץޥåץե뤫
ǥ쥯ȥΥե̾餫Ǽ塢
ֺŬʡ variant ꤹ뤿Ĥˡ
ɤ餫ưޤ
Apache ΥƥȥͥεǽȤˡ
ɤΤ褦ˤƤĴ䤬Ԥ뤫ܺ٤ΤɬפϤޤ
ʤ顢ʸλĤǤϴؿΤͤΤˡ
ѤƤˡˤĤƤޤ</p>
<p>ͥˡĤޤ</p>
<ol>
<li>̾ <strong>Apache Υ르ꥺѤ Server
driven negotiation</strong> ѤޤApache
Υ르ꥺϸ˾ܺ٤Ƥޤ
Υ르ꥺबѤ줿硢Apache
Ϥɤ̤ˤʤ褦ˡμˤʼͤ
ѤפȤǤޤApache
ʼͤѤˡϸǾܺ٤Ƥޤ</li>
<li>RFC 2295
Ƥ뵡Ѥƥ֥饦ä˻ꤷ硢
<strong>transparent content negotiation</strong>
ѤޤΥͥˡǤϡֺŬʡ
variant η֥饦椹뤳ȤǤޤ
Ǥ顢̤ϥ֥饦ѤƤ륢르ꥺ˰¸ޤ
Transparent negotiation νβǡ֥饦 RFC 2296
Ƥ 'remote variant selection algorithm'
¹Ԥ褦ळȤǤޤ</li>
</ol>
<h3><a name="dimensions" id="dimensions">ͥμ</a></h3>
<table>
<tr valign="top">
<th></th>
<th></th>
</tr>
<tr valign="top">
<td>ǥ</td>
<td>֥饦 <code>Accept</code>
إåեɤͥ跹ꤷޤ
ƥऽ줾ϡϢʼͤĤȤǤޤ
variant ʼͤĤȤǤޤ
("qs" ѥ)</td>
</tr>
<tr valign="top">
<td></td>
<td>֥饦 <code>Accept-Language</code>
إåեɤͥ跹ꤷޤ
Ǥ줾ʼͤ뤳ȤǤޤ
variants 0 1 Ĥʾθ
ϢŤ뤳ȤǤޤ</td>
</tr>
<tr valign="top">
<td>ǥ</td>
<td>֥饦 <code>Accept-Encoding</code>
إåեɤͥ跹ꤷޤ
Ǥ줾ʼͤ뤳ȤǤޤ</td>
</tr>
<tr valign="top">
<td>ʸå</td>
<td>֥饦 <code>Accept-Charset</code>
إåեɤͥ跹ꤷޤ
Ǥ줾ʼͤ뤳ȤǤޤ
variant ϥǥפΥѥȤʸåȤ
ꤹ뤳ȤǤޤ</td>
</tr>
</table>
<h3><a name="algorithm" id="algorithm">Apache ͥ르ꥺ</a></h3>
<p>֥饦ֺ֤Ŭʡvariant (⤷) 褦
Apache ϼΥ르ꥺȤȤǤޤ
Υ르ꥺˤѹ뤳ȤϤǤޤ
Τ褦ưޤ:</p>
<ol>
<li>ޤϤˡͥμ줾ˤĤŬڤ
<em>Accept*</em> إåեɤĴ١
variant 줾ʼƤޤ
⤷뼡 <em>Accept*</em> إåǤ variant
ƤǤʤȤƤСޤ
variant ĤĤäƤʤСƥå 4 ˹Ԥޤ</li>
<li>
õˡǡֺŬʡ variant Ӥޤ
ΥƥȤ֤ŬѤޤ
ƥȤʤä variant ϺƤޤ
ƥȸ variant ĤĤäƤСŬʤΤȤ
ƥå 3 ˿ʤߤޤ
ʣ variant ĤäƤСΥƥȤ˿ʤߤޤ
<ol>
<li>variant Υǥפʼͤ <code>Accept</code>
إåʼͤȤѤơǹͤ variant
Ӥޤ</li>
<li>ʼͤǹ variant Ӥޤ</li>
<li>(⤷) <code>Accept-Language</code> إåθ礫
(⤷)
<code class="directive"><a href="./mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>
ǥ쥯ƥ֤θǺŬʸ variant Ӥޤ</li>
<li>ǹ֥٥פΥǥѥ
(text/html ǥפΥСͿ뤿˻Ȥޤ)
variant Ӥޤ</li>
<li><code>Accept-Charset</code> إåԤͿƤǹʸå
ǥѥ variant Ӥޤ
Ū˽Ƥʤ¤ꡢISO-8859-1
Ƥ褦ˤʤäƤޤ
<code>text/*</code> ǥפǤ뤱ɤ
ʸåȤŪ˴ϢŤƤ櫓ǤϤʤ
variant ISO-8859-1 ǤȲꤵޤ</li>
<li>ISO-8859-1 <em>ǤϤʤ</em>ʸåȥǥѥ
ϢŤƤ variant Ӥޤ
Τ褦 variant ʤϡƤ
variant Ӥޤ</li>
<li>Ŭʥǥ variant Ӥޤ
⤷ user-agent Ƥ륨ǥС
variant ΤߤӤޤ
ǤϤʤ⤷ɤ줿ΤȤǤʤ
variant ä¸ߤƤ饨ɤƤʤ
variant ΤߤӤޤ
variant ɤƤ뤫
variant ɤƤʤȤϡ
Ƥ variant Ӥޤ</li>
<li>ƤκǤû variant Ӥޤ</li>
<li>ĤäƤ variant κǽΤΤӤޤ
ץޥåץեκǽ˥ꥹȤƤ뤫
variant ǥ쥯ȥ꤫ǽɤ߹ޤ
ASCIIǥȤƥե̾ƬˤʤäΤɤ餫Ǥ</li>
</ol>
</li>
<li>르ꥺȤäưĤΡֺŬʡvariant ӤޤΤǡ
Ȥ֤ޤͥμꤹ뤿
HTTP 쥹ݥإå <code>Vary</code> ꤵޤ
(Υåˡ
֥饦䥭åϤξȤȤǤޤ)
ʾǽꡣ</li>
<li>褿ȤȤϡvariant Ĥʤä
(֥饦ƤΤʤä) ȤȤǤ
406 ơ ("No Acceptable representation" ̣)
Ѳǽ variant ΥꥹȤΤĤ HTML
ɥȤȤȤ֤ޤ
μ HTTP <code>Vary</code> إåꤵޤ</li>
</ol>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="better" id="better">ʼͤѤ</a></h2>
<p>嵭 Apache ͥ르ꥺθʤʲ
Ǥͤ顢Apache ʼͤѤޤ
ϡΥ르ꥺǴǤϤʤ뤤ΤǤʤ
֥饦ˤ褤̤뤿˹Ԥޤ
ʤݥԥ顼ʥ֥饦ǡ⤷ʤȴְä variant
̤ˤʤäƤޤ褦 <code>Accept</code>
إåΤ⤢ޤ
֥饦äƤС
οѲŬѤޤ</p>
<h3><a name="wildcards" id="wildcards">ǥפȥ磻ɥ</a></h3>
<p><code>Accept:</code> ꥯȥإåϥǥפͥ跹ꤷޤ
Ϥޤ"image/*" "*/*"
Ȥä֥磻ɥɡץǥפޤळȤǤޤ
* Ǥդʸ˥ޥåޤ
Ǥ顢:</p>
<div class="example"><p><code>Accept: image/*, */*</code></p></div>
<p>ޤꥯȤϡ"image/" ǤϤޤ륿ƤƤǤ롢
¾ΤɤʥפƤǤ
(ξϤ "image/*" ϾĹˤʤޤ)
Ȥޤ
ȤΤǤŪʥפ˲äơŪ
磻ɥɤ֥饦⤢ޤ㤨:</p>
<div class="example"><p><code>
Accept: text/html, text/plain, image/gif, image/jpeg, */*
</code></p></div>
<p>뤳ȤϡŪ˥ꥹȤƤ륿פͥ褵뤱ɤ⡢
ۤʤɽѲǽǤФǤɤȤȤǤ
ʤ顢δŪʥ르ꥺǤϡ
*/* 磻ɥɤ¾ƤΥפƱʤΤͥ褵ޤ
֥饦 */* ˤä㤤ʼ (ͥ)
ͤդƥꥯȤ٤ʤΤǤ㤨:</p>
<div class="example"><p><code>
Accept: text/html, text/plain, image/gif, image/jpeg, */*; q=0.01
</code></p></div>
<p>ŪʥפˤʼͤդƤޤΤǡ
ǥեȤ 1.0 (ǹ) ͥˤʤޤ
磻ɥ */* 㤤ͥ 0.01 ͿƤΤǡ
Ū˥ꥹȤƤ륿פ˹פ variant ʤˤΤߡ
¾Υפ֤ޤ</p>
<p>⤷ <code>Accept:</code> إå q ͤޤ<em>ʤ</em>
˾ߤεư뤿ˡ
Apache "*/*" 0.01 q ͤꤷޤ
ޤ"type/*" ηΥ磻ɥɤˤ 0.02 q ͤꤷޤ
(Ǥ餳 "*/*" Υޥåͥ褵ޤ)
⤷ <code>Accept:</code> إåΥǥפΤɤ줫 q
ͤޤǤСüͤŬ<em>줺</em>
֥饦ΥꥯȤϴ̤
ư褦ˤʤޤ</p>
<h3><a name="exceptions" id="exceptions">ͥ㳰</a></h3>
<p>Apache 2.0 ǤϿˡͥŬ礹Τ
ĤΤ˼Ԥˡͥ˥եХåǤ褦
ͥ르ꥺबĤɲäޤ</p>
<p>ФΥڡ饤ȤꥯȤɤ⡢
֥饦äƤ <code>Accept-Language</code> ˹פڡĤ
ĤʤäˡФ "No Acceptable Variant"
"Multiple Choices" 쥹ݥ饤Ȥ֤ޤ
Υ顼å֤ʤ褦ˡ
Τ褦ʾˤ Apache <code>Accept-Language</code> ̵뤷ơ
饤ȤΥꥯȤŪˤϹפʤɥȤ
褦Ǥޤ
<code class="directive"><a href="./mod/mod_negotiation.html#forcelanguagepriority">ForceLanguagePriority</a></code>
ǥ쥯ƥ֤ϡΥ顼ΰĤξС饤ɤ뤿
ѤǤơ
<code class="directive"><a href="./mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>
ǥ쥯ƥ֤ƤȤäƥФȽǤԤ褦ˤǤޤ</p>
<p>Ф¾Ŭ礹ΤĤʤС
쥵֥åȤŬ礹ΤȤ⤷ޤ
㤨Х饤ȤѹѸǤ <code>en-GB</code>
ɥȤꥯȤ硢Ф HTTP/1.1
ʤǤϡñ <code>en</code> ȥޡƤɥȤ
ޥåΤȤ뤳Ȥ̾ϵƤޤ
(ѹѸǤ뤱ɰŪʱѸǤʤȤɤ
ͤʤΤǡAccept-Language إå <code>en-GB</code>
ޤ <code>en</code> ޤޤʤΤϤۤܳμ¤δְ㤤Ǥ롢
ȤȤդƤ
ǤԹʤȤˡ¿Υ饤ȤǤϥǥեȤ
Τ褦ˤʤäƤޤ)
ʤ顢¾θˤϥޥå"No Acceptable Variants"
顼֤ꡢ
<code class="directive"><a href="./mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>
˥եХå褦ȤƤȤϡ
֥åȻ̵뤷ơ<code>en-GB</code> <code>en</code>
˥ޥåޤ
Apache ϥ饤ȤεƸꥹȤ˰ۤ
㤤ʼͤοƸä뤳Ȥˤʤޤ
饤Ȥ "en-GB; q=0.9, fr; q=0.8" ȥꥯȤơ
Ф "en" "fr" ߷פ줿ɥȤäƤϡ
"fr" ɥȤ֤뤳ȤդƤ
Τ褦ʽϡHTTP 1.1 ʤȤݻơ
Ŭڤꤵ줿饤ȤȤ⤭ư뤿
ɬפǤ</p>
<p>٤ʥƥ˥å (Cookie ü URL ѥ)
ˤƤ桼θݡȤ뤿ᡢ
Apache 2.0.47 ϡ<code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code>
<a href="env.html">Ķѿ</a> <code>prefer-language</code>
ǧ褦ˤʤޤ
ѿ¸ߤơŬڤʸ쥿ƤΤǤС
<code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> Ϲפ variant
褦ȤޤפΤ̵С
̾Υͥ礬ŬѤޤ</p>
<div class="example"><h3>Example</h3><p><code>
SetEnvIf Cookie "language=(.+)" prefer-language=$1
</code></p></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="extensions" id="extensions">Transparent Content Negotiation
γĥ</a></h2>
<p>Apache transparent content negotiation ץȥ
(RFC 2295) Τ褦˳ĥƤޤ
ΥƥȥǥΤߤѲǽǤ variant
˰դ뤿ˡ <code>{encoding ..}</code>
Ǥ variant ꥹ˻ȤäƤޤ
ꥹΥɤ줿 variant ǧ
<code>Accept-Encoding</code> ꥯȥإå˽äƵƤ
ɤä variant ϡɤǤ variant
ȤƻѤ褦ˡ
RVSA/1.0 르ꥺ (RFC 2296) μĥޤ
RVSA/1.0 μǤϡŬ variant Ĥޤǡ
ʼͤϾʲ 5 ޤǴݤޤ</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="naming" id="naming">̾Ѵ˴ؤ</a></h2>
<p>ͥȤäƤϡ
ե뤬İʾγĥҤƤơ
ĥҤν֤̾Ϲθʤ
(ܺ٤ <a href="mod/mod_mime.html#multipleext">mod_mime</a>
) Τǡ
Ĥΰۤʤ̾Ѵ٤뤳Ȥˤʤޤ</p>
<p>ŵŪʥեǤϡMIME ׳ĥ (<em>㤨</em>
<code>html</code>) äƤơǥĥ
(<em>㤨</em> <code>gz</code>) äƤ뤫⤷ʤơ
Υե˰ۤʤ variant ѰդƤС
ĥ (<em>㤨</em> <code>en</code>)
äƤǤ礦</p>
<p>:</p>
<ul>
<li>foo.en.html</li>
<li>foo.html.en</li>
<li>foo.en.html.gz</li>
</ul>
<p>ե̾ȡФƻȤȻȤʤǤ:</p>
<table class="bordered">
<tr>
<th>ե̾</th>
<th>Ȥ</th>
<th>Ȥʤ</th>
</tr>
<tr>
<td><em>foo.html.en</em></td>
<td>foo<br />
foo.html</td>
<td>-</td>
</tr>
<tr>
<td><em>foo.en.html</em></td>
<td>foo</td>
<td>foo.html</td>
</tr>
<tr>
<td><em>foo.html.en.gz</em></td>
<td>foo<br />
foo.html</td>
<td>foo.gz<br />
foo.html.gz</td>
</tr>
<tr>
<td><em>foo.en.html.gz</em></td>
<td>foo</td>
<td>foo.html<br />
foo.html.gz<br />
foo.gz</td>
</tr>
<tr>
<td><em>foo.gz.html.en</em></td>
<td>foo<br />
foo.gz<br />
foo.gz.html</td>
<td>foo.html</td>
</tr>
<tr>
<td><em>foo.html.gz.en</em></td>
<td>foo<br />
foo.html<br />
foo.html.gz</td>
<td>foo.gz</td>
</tr>
</table>
<p>ɽơĥҤʤΥ (<em>㤨</em> <code>foo</code>)
ĤǤȤ뤳Ȥ˵դǤ礦
ϡɥȤȤƱե
ºݤΥե륿פäơλȤѹ뤳Ȥʤ
夫եѹǤ롢
<em>㤨</em> <code>html</code> <code>shtml</code>
ˡ뤤 <code>cgi</code> ѹǤǤ</p>
<p> MIME פȤ³ (<em>㤨</em>
<code>foo.html</code>)ϡĥҤ
(ǥĥҤ⤢Фޤ)
MIME ׳ĥҤα¦ˤʤФʤޤ
(<em>㤨</em> <code>foo.html.en</code>)</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="caching" id="caching">å˴ؤջ</a></h2>
<p>å夬Ĥɽ¸ƤȤϡ
ꥯ URL ȴϢŤƤޤ
ˤ URL ꥯȤ줿ˡå
¸ƤɽѤǤޤ
ФǥͥǽǤС
ǽΥꥯȤǥå夵³åҥåȤǤ
ְä֤ƤޤȤȤˤʤ꤫ͤޤ
ɤˡApache ϥƥȥͥ
֤줿ƤˡHTTP/1.0 饤ȤǤ
åԲǽΰĤޤ
ޤͥ줿Υåǽˤ
HTTP/1.1 ץȥεǽ Apache ϥݡȤޤ</p>
<p>HTTP/1.0 Υ饤ȤΥꥯȤФƤϡ
(֥饦ǤȥåǤ)
ͥΥåˡ
<code class="directive"><a href="./mod/mod_negotiation.html#cachenegotiateddocs">CacheNegotiatedDocs</a></code>
ǥ쥯ƥ֤ѤǤޤ
Υǥ쥯ƥ֤ϡեСۥȤ˽ȤǤ
Ȥޤ
HTTP/1.1 饤ȤΥꥯȤˤϸϤޤ</p>
<p>HTTP/1.1 饤ȤФƤϡ쥹ݥΥͥ
<code>Vary</code> HTTP 쥹ݥإåޤ
åϡȤäƸ³ΥꥯȤФƥ륳ԡDZǤ뤫
ɤǤޤ
ͥȤϴطʤ˥륳ԡλѤͥ褹褦ˤˤϡ
<code>force-no-vary</code> <a href="env.html#special">Ķѿ</a>
ꤷޤ</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="more" id="more">ɲþ</a></h2>
<p>ƥȥͥ˴ؤɲþϡ
Alan J. Flavell <a href="http://ppewww.ph.gla.ac.uk/~flavell/www/lang-neg.html">Language
Negotiation Notes</a> Ǥ
Apache 2.0 ǤѹޤिˤϹƤʤ⤷ʤ
ȤȤդƤ</p>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="./en/content-negotiation.html" hreflang="en" rel="alternate" title="English"> en </a> |
<a href="./ja/content-negotiation.html" title="Japanese"> ja </a> |
<a href="./ko/content-negotiation.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 2006 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="./mod/">⥸塼</a> | <a href="./mod/directives.html">ǥ쥯ƥ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Ѹ</a> | <a href="./sitemap.html">ȥޥå</a></p></div>
</body></html>
|