enable Mod_Rewrite ใน ubuntu

6 Sep 2015,
Share: 

Mod_Rewrite คืออะไร?

Mod_Rewrite คือ การแปลง url ที่ดูยุ่งยากให้เป็น url ใหม่ตามที่เราต้องการเพื่อประโยชน์หลายอย่าง เช่น การทํา SEO, การซ่อน url ที่แท้จริงของไฟล์ที่เราไม่ต้องการให้คนอื่นรู้ ฯลฯ

วิธีการ Enable Mod_Rewrite

การ Enable Mod_Rewrite ใน ubuntu ง่ายๆด้วยคําสั่งนี้

sudo a2enmod rewrite

แค่นี้เราก็จะสามารถใช้งาน Mod_Rewrite ได้แล้วครับ

Suggestion blogs

Unbox Raspberry Pi Zero W

Raspberry Pi Zero W เป็นรุ่นที่สอง พัฒนามาจากจาก Raspberry Pi Zero รุ่นนี้ราคาจะอยู่ที่ประมาณ 10$ หรือ ประมาณ 350 บาท สําหรับสิ่งที่เพิ่มเติมเข้ามาในรุ่นมีดังนี้

Auto login on raspberry pi

Auto login on raspberry pi ถ้าเราใช้ debian บน raspberry pi ในโหมด gui ระบบจะ login user: pi ให้เราโดยอัตโนมัติ แต่ถ้าเราต้องการให้ login ด้วย user อื่นๆ ก็สามารถทำได้โดย แก้ไข ไฟล์ "/etc/lightdm/lightdm.conf" ด้วยคำสั่งนี้

Execute the php file and collect the output

ในบทความนี้ผมจะอธิบายวิธีการ Execte ไฟล์ php แล้วเอา output ไปใช้งานต่อ ตัวอย่างเช่น ถ้าเรามีไฟล์ cal.php สําหรับ ทําอะไรซักอย่าง แล้วเราต้องการจะเรียกใช้ไฟล์ดังกล่าวเพื่อเอาผลลัพธ์ไปใช้งาน เราจะสามารถเขียน code ได้ดังนี้


Copyright © 2019 - 2025 thiti.dev |  v1.57.0 |  Privacy policy | 

Build with ❤️ and Astro.

Github profile   Linkedin profile   Instagram   X profile   Nostr   Youtube channel   Telegram   Email contact   วงแหวนเว็บ