Clean url drupal6.x


พอดี blog ส่วนตัวนี้ @nat3 เป็นคนทำ clean url ให้ตอนนั้นเลยทำไม่เป็น แล้วพอดีผมจะลอง update drupal ซะหน่อยก็ต้องลองที่เครื่องผมก่อนเดียวผมอัฟเดท drupal บน server จริงแล้วมันจะเดี้ยงเอาไม่กล้าเสี่ยงขี้เกียจมาแก้ - -! ผมเลยลง drupal6.2 บนเครื่องที่บ้านตามที่ลงบน sever ที่ใช้อยู่ ณ. ปัจจุบัน แล้วก็เจอตอนติดตั้งที่มันจะให้เรา clean url แต่กดไม่ได้ เราก็ต้องเข้าไปแก้ไข apache เพื่อให้มัน Enable ให้เรา

  1. sudo a2enmod rewrite
  2. แก้ไขไฟล์ /etc/apache2/apache2.conf
  3. sudo nano /etc/apache2/apache2.conf

    • โดยการเพิ่มคำสั่งด้านล่าง ตัวอักษรสีฟ้าให้เปลี่ยนตามชื่อ drupal ของเราเอง
    • < Directory /var/www/drupal_website_install> AllowOverride all < /Directory>

  4. restart apache
  5. sudo /etc/init.d/apache2 restart

ที่มา : http://drupal.org/node/134439 กรณีที่เราเช่า host เขาและไม่สามารถแก้ config ได้ให้ไปแก้ไฟล์ .htaccess ได้ตามนี้ http://drupal.org/node/121834 << วิธีนี้ผมลองแล้วก็ยังทำไม่ได้สักที - -! ดูเหมือนง่ายแต่ทำไมกูทำไม่ได้......T T


Comments

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • HTML tags will be transformed to conform to HTML standards.

More information about formatting options

CAPTCHA
คำถามนี้ทดสอบว่าคุณมีความรู้ทางคณิตศาสตร์ ไม่ได้โง่!!!
6 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.