เรื่อง Error Document

เริ่มโดย g-ji, 06 มีนาคม 2009, 04:16:10

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

g-ji

พอดีเจอ Tag template ของ WP ที่เอาไว้ใช้ Redirect โดยเฉพาะนะ

สามารถกำหนด url เป้าหมาย และ ประเภทของ Error Doc ได้ด้วย เอาไว้ใส่ในหน้า 404.php หรือ not found นั้นแหละ ปกติมันจะขึ้น not found เวลา เราเปลี่ยน permalink หรือ พิมพ์ url ผิด/ไม่ตรงกับข้อมูลในเว็บเรา
มันก็จะขึ้นว่า not found ใช่มั้ย แต่ถ้าใช้ tag template WP_redirect ก็จะเด้งมันกลับไปหน้าที่ต้องการได้เลย

แต่ทีนี้ ไม่รู้จะใช้ Error Doc ประเภทไหนดี  :P (ตอนนี้ในเว็บตั้ง 404 เอาไว้เพื่อที่จะบอกบอท GG ว่า มัน not found นะ กลับไปหน้าแรกละกัน นะ ประมาณนั้น :P)

ตัว Error Doc มันมีทั้งหมดนี้

อ้างถึง







































Code Description Comment
100Continue
101Switching Protocols
200OKAction complete successfully
201CreatedSuccess following a POST command
202AcceptedThe request has been accepted for processing, but the processing has not been completed.
203Partial InformationResponse to a GET command, indicates that the returned meta information is from a private overlaid web.
204No ContentServer has received the request but there is no information to send back.
205Reset Content
206Partial ContentThe requested file was partially sent.   Usually caused by stopping or refreshing a web page.
300Multiple Choices
301Moved PermanentlyRequested a directory instead of a file.   The web server substituted the index.html file.
302Moved Temporarily
303See Other
304Not ModifiedThe cached version of the requested file is the same as the file to be sent.
305Use Proxy
400Bad RequestThe request had bad syntax or was impossible to be satisfied.
401Unauthorized User fail to provide a valid user name / password required for access to file / directory.
402Payment Required
403ForbiddenAccess to a protected folder was attempted (i.e.) domain.com/cgi-bin
404Not FoundThe requested file was not found.
405Method Not Allowed
406Not Acceptable
407Proxy Authentication Required
408Request Time-Out
409Conflict
410Gone
411Length Required
412Precondition Failed
413Request Entity Too Large
414Request-URL Too Large
415Unsupported Media Type
500Server Error The server encountered an unexpected condition which prevented it from fulfilling the request
501Not Implemented The server does not support the facility required.
502Bad Gateway
503Out of Resources The server cannot process the request due to a system overload.  This (should) be a temporary condition.
504Gateway Time-Out The service did not respond within the time frame that the gateway was willing to wait.
505HTTP Version not supported

เลยอยากขอความเห็นจากเพื่อนๆ ใน tsb ว่า ควรจะใช้ error document ตัวไหนดี ถึงจะเหมาะที่สุด
สำหรับกรณี

พิมพ์ลิ้งค์ผิด
หาข้อมูลในเว็บไม่เจอ
อื่นๆ ที่ทำให้ not found

ใช้ error แบบไหนดี  :-*

-------

ออลืม tag template สำหรับ สั่ง redirect

<?php wp_redirect(get_option('siteurl'),Error Document code); ?>

ใครอยากทดลอง เข้าเว็บในลายเซ็นไป พิมพ์ อะไรก็ได้ที่ไม่มีในเว็บดูนะ - -* มันจะเด้งกลับมาหน้าแรกหมดเลยสะดวกดีไม่ต้องตั้ง .htaccess

g-ji

ขอขุดกระทู้ตัวเองหน่อยนะ

อยากรู้ความคิดเพื่อนๆ ว่าใช้ error แบบไหนดี

แล้วใช้แบบไหนกันอยู่ เวลา redirect หน้า not found (404)

Bes


[direct=https://client.hostsevenplus.com/aff.php?aff=396]✔ แนะนำ Hosting และ VPS ราคาเริ่มต้น 277 บาทฟรี! SSL ซัพพอทคุยง่าย[/direct]

[direct=https://www.bitkub.com/signup?ref=512782]✔ ซื้อบิทคอยที่ Bitkub (ได้รับการรับรองจาก กลต.)[/direct]

apikongzad

Google เอา แค่ 301 มั้ง? นะ

pizad_sura

กลับไปหน้า index ก็ดีนะครับผมว่า