เนื่องจาก nkv3 ใช้เทคนิค rewite url เพื่อวิ่งไปยังลิ้งต่าง ๆ ในเว็บไชต์ ซึ่งจะต้องแก้ไขค่าของไฟล์ .htaccess เล็กน้อย หากติดตั้งในโฟว์เดอร์ย่อย
วิธีดังนี้
1. เปิดไฟล์ .htacess ในโฟล์เดอร์หลักมาด้วยโปรแกรม notepad แก้ไขจาก
RewriteEngine On
RewriteRule ^menu-(.*).html /showmenu.php?idod=$1
RewriteRule ^news-(.*).html /news.php?idsn=$1
RewriteRule ^photo-(.*).html /showimages.php?idgroup=$1
RewriteRule ^video-(.*).html /showyoutube.php?idy=$1
RewriteRule ^download-(.*).html /loadorder.php?id_sp=$1
RewriteRule ^doc-(.*).html /sread.php?idsr=$1
RewriteRule ^calendar-(.*).html /calender.php?id=$1
เป็น
RewriteEngine On
RewriteRule ^menu-(.*).html /ชื่อโฟว์เดอร์ย่อย/showmenu.php?idod=$1
RewriteRule ^news-(.*).html /ชื่อโฟว์เดอร์ย่อย/news.php?idsn=$1
RewriteRule ^photo-(.*).html /ชื่อโฟว์เดอร์ย่อย/showimages.php?idgroup=$1
RewriteRule ^video-(.*).html /ชื่อโฟว์เดอร์ย่อย/showyoutube.php?idy=$1
RewriteRule ^download-(.*).html /ชื่อโฟว์เดอร์ย่อย/loadorder.php?id_sp=$1
RewriteRule ^doc-(.*).html /ชื่อโฟว์เดอร์ย่อย/sread.php?idsr=$1
RewriteRule ^calendar-(.*).html /ชื่อโฟว์เดอร์ย่อย/calender.php?id=$1
2. เปิดไฟล์ .htaccess ในโฟว์เดอร์ mobile/.htaccess ด้วยโปรแกรม Notepad แก้ไขจาก
RewriteEngine On
RewriteRule ^menu-(.*).html /mobile/showmenu.php?idod=$1
RewriteRule ^news-(.*).html /mobile/news.php?idsn=$1
RewriteRule ^photo-(.*).html /mobile/showimages.php?idgroup=$1
RewriteRule ^video-(.*).html /mobile/showyoutube.php?idy=$1
RewriteRule ^download-(.*).html /mobile/loadorder.php?id_sp=$1
RewriteRule ^doc-(.*).html /mobile/sread.php?idsr=$1
RewriteRule ^calendar-(.*).html /mobile/calender.php?id=$1
เป็น
RewriteEngine On
RewriteRule ^menu-(.*).html /ชื่อโฟว์เดอร์ย่อย/mobile/showmenu.php?idod=$1
RewriteRule ^news-(.*).html /ชื่อโฟว์เดอร์ย่อย/mobile/news.php?idsn=$1
RewriteRule ^photo-(.*).html /ชื่อโฟว์เดอร์ย่อย/mobile/showimages.php?idgroup=$1
RewriteRule ^video-(.*).html /ชื่อโฟว์เดอร์ย่อย/mobile/showyoutube.php?idy=$1
RewriteRule ^download-(.*).html /ชื่อโฟว์เดอร์ย่อย/mobile/loadorder.php?id_sp=$1
RewriteRule ^doc-(.*).html /ชื่อโฟว์เดอร์ย่อย/mobile/sread.php?idsr=$1
RewriteRule ^calendar-(.*).html /ชื่อโฟว์เดอร์ย่อย/mobile/calender.php?id=$1
แก้ภาพไม่แสดงในข่าว
1. เข้าไปที่โฟว์เดอร์ administrator\FCKeditor\editor\filemanager\connectors\php หาไฟล์ที่ชื่อว่า config.php
แก้บรรทัดที่ 35 จาก $Config['UserFilesPath'] = 'http://' . $_SERVER['SERVER_NAME'] . '/images/userfiles/';
เป็น $Config['UserFilesPath'] = 'http://' . $_SERVER['SERVER_NAME'] . '/ชื่อโฟว์เดอร์ย่อย/images/userfiles/';
2. เข้าไปที่โฟว์เดอร์ administrator\FCKeditor\editor\filemanager\upload\php หาไฟล์ที่ชื่อว่า config.php
แก้บรรทัดที่ 33 จาก $Config['UserFilesPath'] = 'http://' . $_SERVER['SERVER_NAME'] . '/images/userfiles/';
เป็น $Config['UserFilesPath'] = 'http://' . $_SERVER['SERVER_NAME'] . '/ชื่อโฟว์เดอร์ย่อย/images/userfiles/';
เรียบร้อย
ขอบพระคุณครับ
วุฒิชัย โลนันท์ |