Notice: A non well formed numeric value encountered in /home/chonable/domains/chonable.com/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Notice: A non well formed numeric value encountered in /home/chonable/domains/chonable.com/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
โดยปกติแล้ว WordPress ไม่ได้สร้างมารองรับการทำงานบน IIS มันจะเปิดได้แค่หน้าแรกหน้าเดียว
ดังนั้นต้องมีการ config เพิ่มเติมเกี่ยวกับการ access ของ webserver
ถ้าเป็น Apache จะอ่านไฟล์ .htaccess แต่ ฝั่ง IIS จะเป็นไฟล์ web.config แทน
ลองแก้ไข ไฟล์ web.config ใน root directory ของเว็บ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Wordpress" patternSyntax="Wildcard"> <match url="*"/> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php?requesturi=/{R:1}"/> </rule> </rules> </rewrite> </system.webServer> </configuration> |
ทีนี้ก็จะสามารถใช้งาน WordPress บน IIS ได้แล้ว