亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
Guides Access control CORS Authentication Browser detection using the user agent Caching Caching FAQ Compression Conditional requests Connection management in HTTP 1.x Content negotiation Content negotiation: List of default Accept values Cookies CSP Messages Overview Protocol upgrade mechanism Proxy servers and tunneling Proxy servers and tunneling: Proxy Auto-Configuration (PAC) file Public Key Pinning Range requests Redirections Resources and specifications Resources and URIs Response codes Server-Side Access Control Session Guides: Basics Basics of HTTP Choosing between www and non-www URLs Data URIs Evolution of HTTP Identifying resources on the Web MIME Types MIME types: Complete list of MIME types CSP Content-Security-Policy Content-Security-Policy-Report-Only CSP: base-uri CSP: block-all-mixed-content CSP: child-src CSP: connect-src CSP: default-src CSP: font-src CSP: form-action CSP: frame-ancestors CSP: frame-src CSP: img-src CSP: manifest-src CSP: media-src CSP: object-src CSP: plugin-types CSP: referrer CSP: report-uri CSP: require-sri-for CSP: sandbox CSP: script-src CSP: style-src CSP: upgrade-insecure-requests CSP: worker-src Headers Accept Accept-Charset Accept-Encoding Accept-Language Accept-Ranges Access-Control-Allow-Credentials Access-Control-Allow-Headers Access-Control-Allow-Methods Access-Control-Allow-Origin Access-Control-Expose-Headers Access-Control-Max-Age Access-Control-Request-Headers Access-Control-Request-Method Age Allow Authorization Cache-Control Connection Content-Disposition Content-Encoding Content-Language Content-Length Content-Location Content-Range Content-Type Cookie Cookie2 Date DNT ETag Expect Expires Forwarded From Headers Host If-Match If-Modified-Since If-None-Match If-Range If-Unmodified-Since Keep-Alive Large-Allocation Last-Modified Location Origin Pragma Proxy-Authenticate Proxy-Authorization Public-Key-Pins Public-Key-Pins-Report-Only Range Referer Referrer-Policy Retry-After Server Set-Cookie Set-Cookie2 SourceMap Strict-Transport-Security TE Tk Trailer Transfer-Encoding Upgrade-Insecure-Requests User-Agent User-Agent: Firefox Vary Via Warning WWW-Authenticate X-Content-Type-Options X-DNS-Prefetch-Control X-Forwarded-For X-Forwarded-Host X-Forwarded-Proto X-Frame-Options X-XSS-Protection Methods CONNECT DELETE GET HEAD Methods OPTIONS PATCH POST PUT Status 100 Continue 101 Switching Protocols 200 OK 201 Created 202 Accepted 203 Non-Authoritative Information 204 No Content 205 Reset Content 206 Partial Content 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 307 Temporary Redirect 308 Permanent Redirect 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 URI Too Long 415 Unsupported Media Type 416 Range Not Satisfiable 417 Expectation Failed 426 Upgrade Required 428 Precondition Required 429 Too Many Requests 431 Request Header Fields Too Large 451 Unavailable For Legal Reasons 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported 511 Network Authentication Required Status
characters

網(wǎng)站所有者反復(fù)提出的問(wèn)題是,是否選擇非 www 或 www 網(wǎng)址。本頁(yè)面提供了一些有關(guān)最好的建議。

什么是域名?

In an HTTP URL, the first substring that follows the initial http:// or https:// is called the domain. It is the name of the server where the document resides.

服務(wù)器不一定是物理機(jī)器:幾臺(tái)服務(wù)器可以駐留在同一臺(tái)物理機(jī)器上?;蛘撸慌_(tái)服務(wù)器可以由多臺(tái)機(jī)器處理,合作產(chǎn)生答案或平衡它們之間的請(qǐng)求負(fù)載。關(guān)鍵是,一個(gè)域名在語(yǔ)義上代表一臺(tái)服務(wù)器。

那么,我必須為我的網(wǎng)站選擇一個(gè)還是另一個(gè)?

  • 是的,你需要選擇一個(gè)并堅(jiān)持下去。選擇哪一個(gè)作為您的規(guī)范位置是您的選擇,但是如果您選擇一個(gè),請(qǐng)堅(jiān)持使用它。它會(huì)讓你的網(wǎng)站對(duì)用戶(hù)和搜索引擎更加一致。這包括始終鏈接到所選域名(如果您在網(wǎng)站中使用相對(duì) URL,這應(yīng)該不難),并始終將鏈接(通過(guò)電子郵件/社交網(wǎng)絡(luò)等)共享到同一個(gè)域名。

  • 不,你可以有兩個(gè)。重要的是你是一致的,并與哪一個(gè)是官方域名一致。這個(gè)官方域名稱(chēng)為 規(guī)范 名稱(chēng)。你所有的絕對(duì)鏈接都應(yīng)該使用它。但即便如此,您仍然可以使其他域名正常工作:HTTP 允許使用兩種技術(shù),以便您的用戶(hù)或搜索引擎明確哪些域是規(guī)范域,同時(shí)仍允許非規(guī)范域工作并提供預(yù)期頁(yè)面。

因此,請(qǐng)選擇一個(gè)您的域名作為您的域名!下面有兩種技術(shù)可以讓非規(guī)范域繼續(xù)工作。

規(guī)范 URL 的技巧

有不同的方法可以選擇哪個(gè)網(wǎng)站是規(guī)范的

使用 HTTP 301重定向

在這種情況下,您需要配置接收 HTTP 請(qǐng)求的服務(wù)器(對(duì)于www和非www URL,這很可能是相同的),以響應(yīng)301對(duì)非規(guī)范域的任何請(qǐng)求的足夠 HTTP 響應(yīng)。這會(huì)將嘗試訪(fǎng)問(wèn)非規(guī)范 URL 的瀏覽器重定向到其規(guī)范等效項(xiàng)。例如,如果您選擇使用非www網(wǎng)址作為規(guī)范類(lèi)型,則應(yīng)將所有 www 網(wǎng)址重定向到其沒(méi)有 www 的等效URL。

示例:

1. 服務(wù)器收到請(qǐng)求http://www.example.org/whaddup(當(dāng)規(guī)范域是 example.org時(shí))

2. 服務(wù)器301使用包含Location標(biāo)題的代碼進(jìn)行回答: http://example.org/whaddup

3. 客戶(hù)端向規(guī)范域發(fā)出請(qǐng)求: http://example.org/whatddup

HTML5樣板項(xiàng)目有一個(gè)例子如何配置Apache服務(wù)器重定向到一個(gè)域到另一個(gè)。

運(yùn)用 <link rel="canonical">

可以在頁(yè)面中添加一個(gè)特殊的 HTML <link>元素來(lái)指示頁(yè)面的規(guī)范地址是什么。這對(duì)頁(yè)面的人類(lèi)讀者沒(méi)有任何影響,但會(huì)告知搜索引擎搜尋器頁(yè)面實(shí)際所在的位置。這樣,搜索引擎就不會(huì)多次索引同一頁(yè)面,有可能導(dǎo)致它被視為重復(fù)的內(nèi)容或垃圾郵件,甚至從搜索引擎結(jié)果頁(yè)中刪除或降低您的頁(yè)面。

當(dāng)添加這樣的標(biāo)簽時(shí),您為兩個(gè)域提供相同的內(nèi)容,告訴搜索引擎哪些 URL 是規(guī)范的。在前面的例子中,http://www.example.org/whaddup會(huì)提供相同的內(nèi)容http://example.org/whaddup,但<link>在頭部還有一個(gè)額外的元素:

<link href="http://example.org/whaddup" rel="canonical">

與以前的情況不同,瀏覽器歷史記錄會(huì)將非www和www的 URL 視為獨(dú)立條目。

讓您的網(wǎng)頁(yè)適用于兩者

利用這些技術(shù),您可以配置服務(wù)器以正確響應(yīng)www前綴和非www前綴域。這樣做是一個(gè)很好的建議,因?yàn)槟鸁o(wú)法預(yù)測(cè)哪些 URL 用戶(hù)將在瀏覽器的 URL 欄中輸入內(nèi)容。選擇哪種類(lèi)型作為規(guī)范位置,然后將其他類(lèi)型重定向到它是一個(gè)問(wèn)題。

決定的案件

這是一個(gè)非常主觀的話(huà)題,它可以被認(rèn)為是一個(gè)自相矛盾的問(wèn)題。

Previous article: Next article: