mod rewrite friendly url ภาษาไทยสำหรับ SEO ของ SMF 2.0 ขึ้นไปครับ ผมลองทำแล้ว ได้ผมแจ่มมากครับ
ทำให้ url เป็นภาษาไทยแล้วมี.html ตามหลังด้วยครับ
ลองทำเมื่อกี้นี่เอง ทำได้แล้วเลยเอามาแบ่งให้คนที่ยังทำไม่ได้ไปลองทำดูครับ
1. Login เข้าสู่ระบบ ไปที่เมนูผู้ดูแล จากนั้นเลือก
ส่วนปรับแต่งค่าการใช้งาน > คลิ๊กที่แสดง URLs โดยปราศจาก ?'s Apache เท่านั้น!
Login as Admin > Edit Features and Options > Show URL's without ?'s
Search engine friendly URLs
Apache/Lighttpd only!
2. แก้ไขไฟล์ ./Source/MessageIndex.php
ค้นหา
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">' . $row['first_subject'] . '</a>'
เอาไปทับของเดิม
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
$keyword= preg_replace("~[\s]+~","-",$row['first_subject']),
$keyword = urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)),
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . str_replace(" ","-",$row['first_subject']) . '" target="_blank">' . $row['first_subject'] . '</a>'
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0[color=red][b]/' . urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)) . '[/b][/color]">' . $row['first_subject'] . '</a>'*/
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . urlencode($keyword) . '" target="_blank">' . $row['first_subject'] . '</a>'*/
3. Save as
แล้วอัพไฟล์ขึ้นโฮสไปทับของเดิมครับ
ขอบคุณ jigload.com
***ผมไม่ต้องการอะไรมากมาย ขอแค่ คำขอบคุณ และ +1 ก็พอครับ ^^ :wanwan017:
ขอบคุณครับ
ขอบคุณมากๆๆนะครับผม
ขอบคุณครับ :wanwan020:
http://www.thaiseoboard.com/index.php?topic=64551.0
ไม่มีอะไร แค่อยากให้เห็น
อ้างถึงจาก: hs4twy ใน 09 กันยายน 2012, 20:40:31
http://www.thaiseoboard.com/index.php?topic=64551.0
ไม่มีอะไร แค่อยากให้เห็น
:wanwan020:
ใจมากครับ :wanwan017:
ขอบคุณครับ
ทิปส์นี้คุณหูกางโพสต์ไว้นานมากแล้ว
http://www.thaiseoboard.com/index.php?topic=64551.0
ขอบคุณครับ :wanwan017:
ขอบคุณครับ
ขอบคุณครับ
หา ./Source/MessageIndex.php ไม่เจอ :wanwan009:
ขอบคุณสำหรับแนวทางครับ :wanwan017:
อ้างถึงจาก: ริคาร์โด้กาก้า ใน 10 กันยายน 2012, 02:08:25
หา ./Source/MessageIndex.php ไม่เจอ :wanwan009:
เข้าไปที่floder forum ของ smf ก่อนครับ แล้วหาfloder Source ครับ MessageIndex.php จะอยู่ในนั้น
อ้างถึงจาก: medusakbpom ใน 09 กันยายน 2012, 18:26:16
mod rewrite friendly url ภาษาไทยสำหรับ SEO ของ SMF 2.0 ขึ้นไปครับ ผมลองทำแล้ว ได้ผมแจ่มมากครับ
ทำให้ url เป็นภาษาไทยแล้วมี.html ตามหลังด้วยครับ
ลองทำเมื่อกี้นี่เอง ทำได้แล้วเลยเอามาแบ่งให้คนที่ยังทำไม่ได้ไปลองทำดูครับ
1. Login เข้าสู่ระบบ ไปที่เมนูผู้ดูแล จากนั้นเลือก
ส่วนปรับแต่งค่าการใช้งาน > คลิ๊กที่แสดง URLs โดยปราศจาก ?'s Apache เท่านั้น!
Login as Admin > Edit Features and Options > Show URL's without ?'s
Search engine friendly URLs
Apache/Lighttpd only!
2. แก้ไขไฟล์ ./Source/MessageIndex.php
ค้นหา
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">' . $row['first_subject'] . '</a>'
เอาไปทับของเดิม
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
$keyword= preg_replace("~[\s]+~","-",$row['first_subject']),
$keyword = urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)),
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . str_replace(" ","-",$row['first_subject']) . '" target="_blank">' . $row['first_subject'] . '</a>'
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0[color=red][b]/' . urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)) . '[/b][/color]">' . $row['first_subject'] . '</a>'*/
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . urlencode($keyword) . '" target="_blank">' . $row['first_subject'] . '</a>'*/
3. Save as
แล้วอัพไฟล์ขึ้นโฮสไปทับของเดิมครับ
ขอบคุณ jigload.com
***ผมไม่ต้องการอะไรมากมาย ขอแค่ คำขอบคุณ และ +1 ก็พอครับ ^^ :wanwan017:
ใช้ smf 2.0.2 ผมทำตามแล้วมันไม่ขึ้นเลยครับ ตกหล่นตรงไหนหรือเปล่าครับ ขอคำแนะนำ ทำใน localhost
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
$keyword= preg_replace("~[\s]+~","-",$row['firstSubject']),
$keyword = urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)),
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . $keyword . '">' . $row['first_subject'] . '</a>'
กด link url ยังเหมือนเดิมครับ
url มันขึ้น อย่างนี้ครับ http://localhost/chevy/index.p...126.msg9050/topicseen.html#new
ไม่ทราบว่าผิดตรงไหนครับ
กด ติ๊ก Search engine friendly URLs
Apache/Lighttpd only! แล้วครับ
อ้างถึงจาก: paiboonkik ใน 10 กันยายน 2012, 10:01:14
อ้างถึงจาก: medusakbpom ใน 09 กันยายน 2012, 18:26:16
mod rewrite friendly url ภาษาไทยสำหรับ SEO ของ SMF 2.0 ขึ้นไปครับ ผมลองทำแล้ว ได้ผมแจ่มมากครับ
ทำให้ url เป็นภาษาไทยแล้วมี.html ตามหลังด้วยครับ
ลองทำเมื่อกี้นี่เอง ทำได้แล้วเลยเอามาแบ่งให้คนที่ยังทำไม่ได้ไปลองทำดูครับ
1. Login เข้าสู่ระบบ ไปที่เมนูผู้ดูแล จากนั้นเลือก
ส่วนปรับแต่งค่าการใช้งาน > คลิ๊กที่แสดง URLs โดยปราศจาก ?'s Apache เท่านั้น!
Login as Admin > Edit Features and Options > Show URL's without ?'s
Search engine friendly URLs
Apache/Lighttpd only!
2. แก้ไขไฟล์ ./Source/MessageIndex.php
ค้นหา
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">' . $row['first_subject'] . '</a>'
เอาไปทับของเดิม
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
$keyword= preg_replace("~[\s]+~","-",$row['first_subject']),
$keyword = urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)),
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . str_replace(" ","-",$row['first_subject']) . '" target="_blank">' . $row['first_subject'] . '</a>'
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0[color=red][b]/' . urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)) . '[/b][/color]">' . $row['first_subject'] . '</a>'*/
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . urlencode($keyword) . '" target="_blank">' . $row['first_subject'] . '</a>'*/
3. Save as
แล้วอัพไฟล์ขึ้นโฮสไปทับของเดิมครับ
ขอบคุณ jigload.com
***ผมไม่ต้องการอะไรมากมาย ขอแค่ คำขอบคุณ และ +1 ก็พอครับ ^^ :wanwan017:
ใช้ smf 2.0.2 ผมทำตามแล้วมันไม่ขึ้นเลยครับ ตกหล่นตรงไหนหรือเปล่าครับ ขอคำแนะนำ ทำใน localhost
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
$keyword= preg_replace("~[\s]+~","-",$row['firstSubject']),
$keyword = urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)),
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . $keyword . '">' . $row['first_subject'] . '</a>'
กด link url ยังเหมือนเดิมครับ
url มันขึ้น อย่างนี้ครับ http://localhost/chevy/index.p...126.msg9050/topicseen.html#new
ไม่ทราบว่าผิดตรงไหนครับ
กด ติ๊ก Search engine friendly URLs
Apache/Lighttpd only! แล้วครับ
ลองอัพไฟล์MessageIndex.php ที่แก้แล้ว ไปทับอันเดิมอีกทีครับ
แล้วลองส่งลิงค์ ในเว็บท่านมาให้ผมดูครับ เพราะบางที เครื่องตัวเองจะยังมองเป็นภาษาแปลกๆอยู่ครับ
ลองส่งลิงค์ให้คนอื่นช่วยดูของผมตอนแรกก็เป็นครับ
ขอบคุณค่ะ
ถามต่อครับ....ถ้าเอาเว็บไทยไปใส่ลิ้งก์เว็บ 2.0และเว็บ social bookmark ของต่างประเทศ ....แล้วblog เราจะโดนลบหรือเปล่าครับ :wanwan044: :wanwan044:
อ้างถึงจาก: Muller ใน 10 กันยายน 2012, 18:00:37
ถามต่อครับ....ถ้าเอาเว็บไทยไปใส่ลิ้งก์เว็บ 2.0และเว็บ social bookmark ของต่างประเทศ ....แล้วblog เราจะโดนลบหรือเปล่าครับ :wanwan044: :wanwan044:
เคยเอาไปลง ไม่โดนนะ แรงดีด้วย ไม่รู้ว่าเพราะเขาจับไม่ได้ หรือไม่ลบอยู่แล้ว ก็ไม่รู้
อ้างถึงจาก: medusakbpom ใน 09 กันยายน 2012, 18:26:16
mod rewrite friendly url ภาษาไทยสำหรับ SEO ของ SMF 2.0 ขึ้นไปครับ ผมลองทำแล้ว ได้ผมแจ่มมากครับ
ทำให้ url เป็นภาษาไทยแล้วมี.html ตามหลังด้วยครับ
ลองทำเมื่อกี้นี่เอง ทำได้แล้วเลยเอามาแบ่งให้คนที่ยังทำไม่ได้ไปลองทำดูครับ
1. Login เข้าสู่ระบบ ไปที่เมนูผู้ดูแล จากนั้นเลือก
ส่วนปรับแต่งค่าการใช้งาน > คลิ๊กที่แสดง URLs โดยปราศจาก ?'s Apache เท่านั้น!
Login as Admin > Edit Features and Options > Show URL's without ?'s
Search engine friendly URLs
Apache/Lighttpd only!
2. แก้ไขไฟล์ ./Source/MessageIndex.php
ค้นหา
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">' . $row['first_subject'] . '</a>'
เอาไปทับของเดิม
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
$keyword= preg_replace("~[\s]+~","-",$row['first_subject']),
$keyword = urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)),
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . str_replace(" ","-",$row['first_subject']) . '" target="_blank">' . $row['first_subject'] . '</a>'
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0[color=red][b]/' . urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)) . '[/b][/color]">' . $row['first_subject'] . '</a>'*/
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . urlencode($keyword) . '" target="_blank">' . $row['first_subject'] . '</a>'*/
3. Save as
แล้วอัพไฟล์ขึ้นโฮสไปทับของเดิมครับ
ขอบคุณ jigload.com
***ผมไม่ต้องการอะไรมากมาย ขอแค่ คำขอบคุณ และ +1 ก็พอครับ ^^ :wanwan017:
ใช้ 2RC3 โมเรียบร้อยแล้วไม่มีอะไรเปลี่ยนแปลงอ่ะครับ ???
ลิงค์ยังเหมือนเดิม ต้องทำอะไรเพิ่มเติมอีกหรือเปล่า ??
อย่างไรก็ขอบคุณครับ +1
อ้างถึงจาก: hs4twy ใน 09 กันยายน 2012, 20:40:31
http://www.thaiseoboard.com/index.php?topic=64551.0
ไม่มีอะไร แค่อยากให้เห็น
ขอบคุณคุณหูกางด้วยเช่นกันครับ
เจอ error log แบบนี้
Undefined index: firstSubject
อ้างถึงจาก: HaChi ใน 15 กันยายน 2012, 12:41:09
เจอ error log แบบนี้
Undefined index: firstSubject
ของผม 2.0 CR5 ก็ทำได้ปกตินะครับ ทำแล้วลองให้คนอื่นเข้าดูให้ครับ
เพราะตอนแรกผม ทำแล้วในเครื่องตัวเอง url ก็เป็นเหมือนเดิมครับ
แต่ลองให้คนอื่นเข้าดู url เปลี่ยนเป็นภาษาไทยครับ
ไปลองมาและครับ ใช้ได้เลยครับ ขอบคุณครับ :wanwan007:
ขอบคุณมากครัชชช :wanwan008:
ขอเก็บนะครับ
ขอบคุณมากนะครับ
+1 :wanwan011: คือ อะไรไม่เข้าใจ แต่ คงจะดี (ใช่มั้ย?)
ขอบคุณมากครับ :wanwan017: :wanwan017: