11 ธันวาคม 2551

Boot INI Options Reference

Mark Russinovich

Published: November 1, 2006

Introduction

There are number of BOOT.INI switches that are useful for driver developers that wish to test their drivers under a variety of different system configurations without having to have a separate machine for every one. For example, limiting the amount of memory NT sees can be useful for stressing memory loads, and limiting the number of processors for testing scalability. I've compiled a complete list of the options that BOOT.INI currently supports. This list is reproduced in the Startup, Shutdown and Crashes chapter of Windows Internals, where you'll find more information about the boot process.

Note: to see what options a system has booted with examine HKLM\System\CurrentControlSet\Control\SystemStartOptions.

*       /3GB
Increases the size of the user process address space from 2 GB to 3 GB (and therefore reduces the size of system space from 2 GB to 1 GB). Giving virtual-memory- intensive applications such as database servers a larger address space can improve their performance. For an application to take advantage of this feature, however, two additional conditions must be met: the system must be running Windows XP, Windows Server 2003, Windows NT 4 Enterprise Edition, Windows 2000 Advanced Server or Datacenter Server and the application exe must be flagged as a 3-GB-aware application. Applies to 32-bit systems only.

*       /BASEVIDEO
Causes Windows to use the standard VGA display driver for GUI-mode operations.

*       /BAUDRATE=
Enables kernel-mode debugging and specifies an override for the default baud rate (19200) at which a remote kernel debugger host will connect. Example: /BAUDRATE=115200.

*       /BOOTLOG
Causes Windows to write a log of the boot to the file %SystemRoot%\Ntbtlog.txt.

*       /BOOTLOGO
Use this switch to have Windows XP or Windows Server 2003 display an installable splash screen instead of the standard splash screen. First, create a 16-color (any 16 colors) 640x480 bitmap and save it in the Windows directory with the name Boot.bmp. Then add "/bootlogo /noguiboot" to the boot.ini selection.

*       /BREAK
Causes the hardware abstraction layer (HAL) to stop at a breakpoint at HAL initialization. The first thing the Windows kernel does when it initializes is to initialize the HAL, so this breakpoint is the earliest one possible. The HAL will wait indefinitely at the breakpoint until a kernel-debugger connection is made. If the switch is used without the /DEBUG switch, the system will Blue Screen with a STOP code of 0x00000078 (PHASE0_ EXCEPTION).

*       /BURNMEMORY=
Specifies an amount of memory Windows can't use (similar to the /MAXMEM switch). The value is specified in megabytes. Example: /BURNMEMORY=128 would indicate that Windows can't use 128 MB of the total physical memory on the machine.

*       /CHANNEL=
Used on conjunction with /DEBUGPORT=1394 to specify the IEEE 1394 channel through which kernel debugging communications will flow. This can be any number between 0 and 62 and defaults to 0 if not set.

*       /CLKLVL
Causes the standard x86 multiprocessor HAL (Halmps.dll) to configure itself for a level-sensitive system clock rather then an edge-triggered clock. Level-sensitive and edge-triggered are terms used to describe hardware interrupt types.

*       /CMDCONS
Passed when booting with into the Recovery Console (described later in this chapter).

*       /CRASHDEBUG
Causes the kernel debugger to be loaded when the system boots, but to remain inactive unless a crash occurs. This allows the serial port that the kernel debugger would use to be available for use by the system until the system crashes (vs. /DEBUG, which causes the kernel debugger to use the serial port for the life of the system session).

*       /DEBUG
Enables kernel-mode debugging.

*       /DEBUGPORT=
Enables kernel-mode debugging and specifies an override for the default serial (usually COM2 on systems with at least two serial ports) to which a remote kernel-debugger host is connected. Windows XP and Windows Server 2003 also support debugging through accept IEEE 1394 ports. Examples: /DEBUGPORT=COM2, /DEBUGPORT=1394.

*       /EXECUTE
This option disables no-execute protection. See the /NOEXECUTE switch for more information.

*       /FASTDETECT
Default boot option for Windows. Replaces the Windows NT 4 switch /NOSERIALMICE. The reason the qualifier exists (vs. just having NTDETECT perform this operation by default) is so that NTDETECT can support booting Windows NT 4. Windows Plug and Play device drivers perform detection of parallel and serial devices, but Windows NT 4 expects NTDETECT to perform the detection. Thus, specifying /FASTDETECT causes NTDETECT to skip parallel and serial device enumeration (actions that are not required when booting Windows), whereas omitting the switch causes NTDETECT to perform this enumeration (which is required for booting Windows NT 4).

*       /INTAFFINITY
Directs the standard x86 multiprocessor HAL (Halmps.dll) to set interrupt affinities such that only the highest numbered processor will receive interrupts. Without the switch, the HAL defaults to its normal behavior of letting all processors receive interrupts.

*       /KERNEL=/HAL=
Enable you to override Ntldr's default filename for the kernel image (Ntoskrnl.exe) and/or the HAL (Hal.dll). These options are useful for alternating between a checked kernel environment and a free (retail) kernel environment or even to manually select a different HAL. If you want to boot a checked environment that consists solely of the checked kernel and HAL, which is typically all that is needed to test drivers, follow these steps on a system installed with the free build:

1.    Copy the checked versions of the kernel images from the checked build CD to your \Windows\System32 directory, giving the images different names than the default. For example, if you're on a uniprocessor, copy Ntoskrnl.exe to Ntoschk.exe and Ntkrnlpa.exe to Ntoschkpa.exe. If you're on a multiprocessor, copy Ntkrnlmp.exe to Ntoschk.exe and Ntkrpamp.exe to Ntoschkpa.exe. The kernel filename must be an 8.3-style short name.

2.    Copy the checked version of the appropriate HAL needed for your system from \I386\Driver.cab on the checked build CD to your \Windows\System32 directory, naming it Halchk.dll. To determine which HAL to copy, open \Windows\Repair\Setup.log and search for Hal.dll; you'll find a line like \WINDOWS\system32\ hal.dll="halacpi.dll","1d8a1". The name immediately to the right of the equals sign is the name of the HAL you should copy. The HAL filename must be an 8.3-style short name.

3.    Make a copy of the default line in the system's Boot.ini file.

4.    In the string description of the boot selection, add something that indicates that the new selection will be for a checked build environment (for example, "Windows XP Professional Checked").

5.    Add the following to the end of the new selection's line: /KERNEL=NTOSCHK.EXE /HAL= HALCHK.DLL

6.    Now when the selection menu appears during the boot process you can select the new entry to boot a checked environment or select the entry you were using to boot the free build.

*       /LASTKNOWNGOOD
Causes the system to boot as if the LastKnownGood boot option was selected.

*       /MAXMEM=
Limits Windows to ignore (not use) physical memory beyond the amount indicated. The number is interpreted in megabytes. Example: /MAXMEM=32 would limit the system to using the first 32 MB of physical memory even if more were present.

*       /MAXPROCSPERCLUSTER=
For the standard x86 multiprocessor HAL (Halmps.dll), forces cluster-mode Advanced Programmable Interrupt Controller (APIC) addressing (not supported on systems with an 82489DX external APIC interrupt controller).

*       /MININT
This option is used by Windows PE (Preinstallation Environment) and causes the Configuration Manager to load the Registry SYSTEM hive as a volatile hive such that changes made to it in memory are not saved back to the hive image.

*       /NODEBUG
Prevents kernel-mode debugging from being initialized. Overrides the specification of any of the three debug-related switches, /DEBUG, /DEBUGPORT, and /BAUDRATE.

*       /NOEXECUTE
This option is only available on 32-bit versions of Windows when running on processors supporting no-execute protection. It enables no-execute protection (also known as Data Execution Protection - DEP), which results in the Memory Manager marking pages containing data as no-execute so that they cannot be executed as code. This can be useful for preventing malicious code from exploiting buffer overflow bugs with unexpected program input in order to execute arbitrary code. No-execute protection is always enabled on 64-bit versions of Windows on processors that support no-execute protection. There are several options you can specify with this switch:

·         /NOEXECUTE=OPTIN Enables DEP for core system images and those specified in the DEP configuration dialog.

·         /NOEXECUTE=OPTOUT Enables DEP for all images except those specified in the DEP configuration dialog.

·         /NOEXECUTE=ALWAYSON Enables DEP on all images.

·         /NOEXECUTE=ALWAYSOFF Disables DEP.

*       /NOGUIBOOT
Instructs Windows not to initialize the VGA video driver responsible for presenting bitmapped graphics during the boot process. The driver is used to display boot progress information, so disabling it will disable the ability of Windows to show this information.

*       /NOLOWMEM
Requires that the /PAE switch be present and that the system have more than 4 GB of physical memory. If these conditions are met, the PAE-enabled version of the Windows kernel, Ntkrnlpa.exe, won't use the first 4 GB of physical memory. Instead, it will load all applications and device drivers, and allocate all memory pools, from above that boundary. This switch is useful only to test device driver compatibility with large memory systems.

*       /NOPAE
Forces Ntldr to load the non-Physical Address Extension (PAE) version of the Windows kernel, even if the system is detected as supporting x86 PAEs and has more than 4 GB of physical memory.

*       /NOSERIALMICE=[COMx | COMx,y,z...]
Obsolete Windows NT 4 qualifier-replaced by the absence of the /FASTDETECT switch. Disables serial mouse detection of the specified COM ports. This switch was used if you had a device other than a mouse attached to a serial port during the startup sequence. Using /NOSERIALMICE without specifying a COM port disables serial mouse detection on all COM ports. See Microsoft Knowledge Base article Q131976 for more information.

*       /NUMPROC=
Specifies the number of CPUs that can be used on a multiprocessor system. Example: /NUMPROC=2 on a four-way system will prevent Windows from using two of the four processors.

*       /ONECPU
Causes Windows to use only one CPU on a multiprocessor system.

*       /PAE
Causes Ntldr to load Ntkrnlpa.exe, which is the version of the x86 kernel that is able to take advantage of x86 PAEs. The PAE version of the kernel presents 64-bit physical addresses to device drivers, so this switch is helpful for testing device driver support for large memory systems.

*       /PCILOCK
Stops Windows from dynamically assigning IO/IRQ resources to PCI devices and leaves the devices configured by the BIOS. See Microsoft Knowledge Base article Q148501 for more information.

*       /RDPATH=
Specifies the path to a System Disk Image (SDI) file, which can be on the network, that the system will use to boot from. Often used in conjunction with the /RDIMAGEOFFSET= flag to indicate to NTLDR where in the file the system image starts.

*       /REDIRECT
Introduced with Windows XP. Used to cause Windows to enable Emergency Management Services (EMS) that reports boot information and accepts system management commands through a serial port. Specify serial port and baudrate used in conjunction with EMS with redirect= and redirectbaudrate= lines in the [boot loader] section of the Boot.ini file.

*       /SAFEBOOT:
Specifies options for a safe boot. You should never have to specify this option manually, since Ntldr specifies it for you when you use the F8 menu to perform a safe boot. (A safe boot is a boot in which Windows only loads drivers and services that are specified by name or group under the Minimal or Network registry keys under HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot.) Following the colon in the option you must specify one of three additional switches: MINIMAL, NETWORK, or DSREPAIR. The MINIMAL and NETWORK flags correspond to safe boot with no network and safe boot with network support, respectively. The DSREPAIR (Directory Services Repair) switch causes Windows to boot into a mode in which it restores the Active Directory directory service from a backup medium you present. An additional option you can append is (ALTERNATESHELL), which tells Windows to use the program specified by the HKLM\SYSTEM\CurrentControlSet\ SafeBoot\AlternateShell value as the graphical shell rather than to use the default, which is Windows Explorer.

*       /SDIBOOT=
Used in Windows XP Embedded systems to have Windows boot from a RAM disk image stored in the specified System Disk Image (SDI) file.

*       /SOS
Causes Windows to list the device drivers marked to load at boot time and then to display the system version number (including the build number), amount of physical memory, and number of processors.

*       /TIMERES=
Sets the resolution of the system timer on the standard x86 multiprocessor HAL (Halmps.dll). The argument is a number interpreted in hundreds of nanoseconds, but the rate is set to the closest resolution the HAL supports that isn't larger than the one requested. The HAL supports the following resolutions: Hundreds of nanoseconds Milliseconds (ms) 9766 0.98 19532 2.00 39063 3.90 78125 7.80 The default resolution is 7.8 ms. The system timer resolution affects the resolution of waitable timers. Example: /TIMERES=21000 would set the timer to a resolution of 2.0 ms.

*       /USERVA=
This switch is only supported on Windows XP and Windows Server 2003. Like the /3GB switch, this switch gives applications a larger address space. Specify the amount in MB between 2048 and 3072. This switch has the same application requirements as the /3GB switch and requires that the /3GB switch be present. Applies to 32-bit systems only.

*       /WIN95
Directs Ntldr to boot the Consumer Windows boot sector stored in Bootsect.w40. This switch is pertinent only on a triple-boot system that has MS-DOS, Consumer Windows, and Windows installed. See Microsoft Knowledge Base article Q157992 for more information.

*       /WIN95DOS
Directs Ntldr to boot the MS-DOS boot sector stored in Bootsect.dos. This switch is pertinent only on a triple-boot system that has MS-DOS, Consumer Windows, and Windows installed. See Microsoft Knowledge Base article Q157992 for more information.

*       /YEAR=
Instructs the Windows core time function to ignore the year that the computer's real-time clock reports and instead use the one indicated. Thus, the year used in the switch affects every piece of software on the system, including the Windows kernel. Example: /YEAR=2001. (This switch was created to assist in Y2K testing.)

Thanks to Jonas Fischer for pointing out the PCILOCK and NOSERIALMICE switches. Thanks to Rob Green for information on the FASTDETECT switch.

 

03 ธันวาคม 2551

พระบาทสมเด็จพระเจ้าอยู่หัว กับคอมพิวเตอร์

     เนื่องในวโรกาสวันเฉลิมพระชนมพรรษาซึ่งกำลังจะมาถึงใน 5 ธันวาคมนี้ กระผมขออนุญาตนำเสนอเรื่องราวเกี่ยวกับพระอัจฉริยภาพของพระบาทสมเด็จพระเจ้าอยู่หัว รัชกาลปัจจุบันให้เพื่อนๆได้รับทราบกันนะครับ หลายท่านคงอาจจะเคยรับทราบว่าพระบาทสมเด็จพระเจ้าอยู่หัวของปวงชนชาวไทยเรานั้นทรงมีพระอัจฉริยภาพมากมายหลายประการ เช่นพระอัจฉริยภาพทางด้านวิทยาศาสตร์ วิศวกรรมศาสตร์ การเกษตร การชลประทาน การอนุรักษ์สิ่งแวดล้อม และการใช้เครื่องมือเทคโนโลยีต่างๆ ที่สำคัญพระองค์ได้ทรงนำพระอัจฉริยภาพในด้านต่างๆของพระองค์ออกมาใช้ผ่านโครงการในพระราชดำริต่างๆ ทั้งนี้ทั้งนั้นก็เพื่อทำให้ชีวิตความเป็นอยู่ของพสกนิกรชาวไทยดีขึ้น สำหรับในบทความนี้ผมจะนำเสนอเฉพาะในส่วนของพระอัจฉริยภาพทางด้านคอมพิวเตอร์ครับ เพื่อให้เพื่อนๆของเราที่มีความสนใจทางด้านคอมพิวเตอร์ได้รับทราบถึงพระอัจฉริยภาพทางด้านคอมพิวเตอร์ของพระบาทสมเด็จพระเจ้าอยู่หัวครับ

 ทรงใช้เครื่องคอมพิวเตอร์ในการแต่งเพลง

      ม.ล.อัศนี ปราโมช ได้ตกลงใจซื้อเครื่องแมคอินทอชพลัสซึ่งเป็นเครื่องที่ทันสมัยที่สุดในยุคนั้นขึ้นทูลเกล้าฯ ถวาย สาเหตุที่ ม.ล.อัศนี ปราโมช ได้เลือกเครื่องคอมพิวเตอร์นี้ก็เพราะว่า ม.ล.อัศนี ปราโมช ได้ทราบว่าพระบาทสมเด็จพระเจ้าอยู่หัวทรงสนพระทัยทางด้านดนตรี และในขณะนั้นเครื่องแมคอินทอชพลัสนั้นสามารถเก็บและพิมพ์โน้ตเพลงได้ และยังสามารถเชื่อมต่ออุปกรณ์พิเศษสำหรับเล่นดนตรีตามโน้ตเพลงที่เก็บไว้ได้ด้วย

ทรงประดิษฐ์ตัวอักษร หรือฟอนต์(Font)

      หลังจากที่พระองค์ทรงใช้เครื่องคอมพิวเตอร์ในการแต่งเพลงไปได้สักระยะหนึ่ง พระองค์ก็ได้สนใจในการออกแบบรูปแบบตัวอักษร หรือฟอนต์(Font) โดยพระองค์ทรงศึกษาโปรแกรม "Fontastic" และพระองค์ได้ทรงประดิษฐ์ฟอนต์ขึ้นมา อันได้แก่ ฟอนต์จิตรลดา ฟอนต์ภูพิงค์ และฟอนต์ไทยอื่นๆอีกมากมาย และนอกจากฟอนต์ภาษาไทยแล้วพระองค์ได้ทรงประดิษฐ์ฟอนต์ภาษาอื่นๆอีกด้วยเช่น ฟอนต์ภาษาสันสกฤต ฟอนต์ภาษาเทวนาครี (ภาษาแขก) เป็นต้น ซึ่งฟอนต์เทวนาครีนี้มีความยากในการออกแบบที่ยากกว่าฟอนต์อื่นๆมากเลยครับ เพราะ ตัวอักษรเทวนาครี หรือ ตัวอักษรแขกนั้น มีรูปแบบที่ไม่คงตัวเหมือนตัวอักษรภาษาอื่นๆที่ทั่วโลกใช้กัน หรือกล่าวคือ ถ้านำส่วนหนึ่งของอักษรนำมาต่อรวมกับอีกส่วนหนึ่งของอักษร จะเกิดอักษรใหม่ขึ้นนั้นเองครับ (ใครที่เคยเห็นอักษรแขกก็คงพอจะนึกออกนะครับ เป็นตัวอักษรที่อ่านยากมากๆตัวอักษรหนึ่งเลยก็ว่าได้(เขียนยากมากด้วยครับ))

      สาเหตุที่พระบาทสมเด็จพระเจ้าอยู่หัว ทรงสนพระทัยในตัวอักษรเทวนาครี หรือ ตัวอักษรแขกนั้น เพราะว่าพระองค์ทรงศึกษาธรรมะในพระพุทธศาสนาอย่างจริงจังและลึกซึ้ง การที่ทรงศึกษาตัวอักษรแขก ก็เพื่อเป็นการนำไปสู่ความเข้าใจด้านอักษรศาสตร์ และความเข้าใจในหัวข้อธรรมะนั่นเอง เพราะคำสอนและข้อธรรมะในพุทธศาสนานั้น เดิมทีก็เกิดและเผยแพร่มาจากประเทศอินเดีย บรรดาธรรมะที่ลึกซึ้งและยากแก่ความเข้าใจ ก็อาจจะถูกตีความผันแปรบิดเบือนไปได้ ดังนั้นการศึกษาค้นคว้าลึกลงไปถึงภาษาแขก จึงน่าจะได้ความรู้เกี่ยวกับธรรมะชัดเจนกระจ่างมากขึ้น

 

ทรงเขียนโปรแกรมขึ้นมาใช้เอง

      ต่ออมาได้มีผู้ทูลเกล้าฯ ถวายเครื่องคอมพิวเตอร์ IBM PC Compatible และทรงสนพระทัยศึกษาในการพัฒนา Software ต่างๆ และได้สร้างโปรแกรมใหม่ๆ ขึ้นมา รวมทั้งสนพระทัยในเทคนิคการทำงานของเครื่องคอมพิวเตอร์แบบนี้มากทีเดียว บางครั้งทรงเปิดเครื่องออกดูระบบต่างๆ ภายในด้วยพระองค์เอง หรือทรงปรับปรุง Software ใหม่ขึ้นใช้ ทรงแก้ซอฟต์แวร์ในเครื่อง เช่น โปรแกรมภาษาไทย CU WRITER ให้เป็นไปตามพระราชประสงค์

 

ทรงออกแบบ ส.ค.ส ด้วยเครื่องคอมพิวเตอร์

      ส.ค.ส. พระราชทาน เป็นบัตรส่งความสุข ซึ่ง พระบาทสมเด็จพระเจ้าอยู่หัว ทรงประดิษฐ์ขึ้นด้วยพระองค์เอง เพื่อพระราชทานแก่พสกนิกรชาวไทย เนื่องในโอกาสวันขึ้นปีใหม่ เป็นประจำทุกปี (ยกเว้น พ.ศ. 2548)*

      ในวันสิ้นปี (31 ธันวาคม) ของทุกปี พระบาทสมเด็จพระเจ้าอยู่หัว จะทรงพระกรุณาโปรดเกล้าฯ พระราชทานพร เนื่องในโอกาสขึ้นปีใหม่ ทางสถานีวิทยุ และสถานีโทรทัศน์ทุกสถานี นอกจากนี้ ยังทรงปลีกเวลาจากพระราชกรณียกิจ มาปรุแถบโทรพิมพ์ (เทเล็กซ์) พระราชทานพรปีใหม่ แก่เจ้าหน้าที่ผู้ถวายงาน โดยทรงใช้รหัสแทนพระองค์ว่า กส. 9 เช่นเดียวกับที่ทรงใช้ติดต่อทางวิทยุสื่อสาร ทรงระบุท้ายโทรพิมพ์ว่า กส. 9 ปรุ ส.ค.ส. พระราชทาน ที่เป็นโทรพิมพ์เหล่านี้ เริ่มเผยแพร่สู่สาธารณชน เมื่อปี พ.ศ. 2530

 

พระไตรปิฎกฉบับคอมพิวเตอร์

       ในส่วนที่เกี่ยวกับศาสนานั้น ได้ทรงพระกรุณาโปรดเกล้าฯ บริจาคทรัพย์ส่วนพระองค์ จำนวน ๑,๔๗๒,๙๐๐ บาท ในเดือนพฤษภาคม ๒๕๓๔ ให้มหาวิทยาลัยมหิดล จัดทำโครงการพัฒนาระบบคอมพิวเตอร์เพื่อการศึกษาพระไตรปิฎก และอรรถกถาต่อเนื่องจากโครงการพระไตรปิฎกฉบับคอมพิวเตอร์เดิม ที่มหาวิทยาลัยมหิดลพัฒนาเสร็จแล้ว และได้ทูลเกล้าฯ ถวายเพื่อร่วมเฉลิมฉลองเนื่องในวโรกาสรัชมังคลาภิเษก ๒ กรกฎาคม ๒๕๓๑

       ทรงเห็นว่าโครงการนี้ควรได้รวบรวมเอาชุดอรรถกถาและฎีกาเข้าไว้ด้วยกัน นับเป็นโครงการที่นำวิทยาการชั้นสูงมาประยุกต์ใช้กับข้อมูลเนื้อหาทางด้าน พุทธศาสนา ซึ่งพระบาทสมเด็จพระเจ้าอยู่หัว ได้ทรงศึกษาพระไตรปิฎกและอรรถกถาฉบับคอมพิวเตอร์นี้ด้วยพระองค์เอง และมีพระบรมราชวินิจฉัย และพระราชวิจารณ์ในการออกแบบโปรแกรมสำหรับใช้ในการสืบค้นข้อมูล ในฐานะแห่งองค์เอกอัครศาสนูปถัมภก

       การครั้งนี้กล่าวได้ว่า เป็นการสืบต่อพระพุทธศาสนาให้ยั่งยืนยาวนานสืบไปในอนาคตกาล เพราะโครงการพระราชดำรินี้ เป็นส่วนสนับสนุนอย่างสำคัญ ที่ทำให้การศึกษาพระไตรปิฎกและชุดอรรถกถาเป็นไปได้อย่างสะดวกรวดเร็ว ถูกต้อง แม่นยำ อีกทั้งรวบรวมเนื้อหาไว้อย่างครบถ้วนสมบูรณ์ เป็นประโยชน์โดยตรงต่อการเผยแผ่พระพุทธศาสนา นับเป็นการใช้วิทยาการอันก้าวหน้าทางคอมพิวเตอร์ได้อย่างเหมาะสม
และสร้างสรรค์

      สำหรับ โครงการพัฒนาระบบคอมพิวเตอร์ เพื่อการศึกษาพระไตรปิฎกและอรรถกถาตามพระราชดำรินี้ ได้พัฒนาแล้วเสร็จในเดือนพฤศจิกายน ๒๕๓๔ ในชื่อ BUDSIR IV โดยพัฒนาต่อเนื่องจาก โปรแกรม BUDSIR (อ่านออกเสียงว่า บุดเซอร์) มาจากคำว่า Buddhist Scriptures Information Retrieval

 

ประวัติของ BUDSIR

BUDSIR I สามารถค้นหาคำทุกคำ ศัพท์ทุกศัพท์ ทุกวลี ทุกพุทธวจนะ ที่มีปรากฏในพระไตรปิฎก จำนวน 45 เล่ม หรือข้อมูลมากกว่า24.3ล้านตัวอักษรที่ได้รับการบันทึกในคอมพิวเตอร์ได้อย่าง
รวดเร็ว ถูกต้อง และครบถ้วนสมบูรณ์

BUDSIR II
พัฒนาแล้วเสร็จในเดือนกันยายน 2532 ซึ่งเป็นพระไตรปิฎกอักษรโรมัน สำหรับการเผยแผ่ไปยังต่างประเทศ

BUDSIR III ได้รับการพัฒนาขึ้นอีกในเดือนเมษายน 2533 เพื่องานสืบค้นที่มีความซับซ้อน 

BUDSIR IV ได้รวบรวมพระไตรปิฎกและอรรถกถา/ฎีกา รวมทั้งคัมภีร์ทุกเล่มที่ใช้ศึกษาหลักสูตรเปรียญธรรม
นอกจากนี้ยังรวม version ที่เป็นอักษรโรมันเข้าไว้ด้วยกัน ซึ่งมีขนาดข้อมูลรวม 115 เล่ม หรือประมาณ 450 ล้านตัวอักษร นับเป็นพระไตรปิฎกและอรรถกถา ฉบับคอมพิวเตอร์ที่สมบูรณ์ที่สุดในปัจจุบัน และมหาวิทยาลัยมหิดล ยังได้พัฒนาโครงการดังกล่าวเพิ่มเติม โดยบันทึกพระไตรปิฎกและอรรถกถา ลงบนแผ่น CD-ROM แล้วเสร็จในเดือนกรกฎาคม 2537 ซึ่งจะอำนวยความสะดวกอย่างมากต่อผู้ที่ต้องการจะศึกษาค้นคว้าพระไตรปิฎก ไม่ว่าจะเป็นชาวไทย หรือชาวต่างประเทศ ซึ่งมหาวิทยาลัยได้ทูลเกล้าฯ ถวายแด่พระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดชมหาราช และสมเด็จพระเทพรัตนราชสุดาฯ สยามบรมราชกุมารี ในวันที่ 18 มกราคม 2538 และในปัจจุบันสำนักคอมพิวเตอร์ ได้เริ่มโครงการพัฒนาโปรแกรมพระไตรปิฎกคอมพิวเตอร์ ฉบับภาษาไทย เพื่อให้พุทธศาสนิกชนทั่วไปได้ศึกษา อันจะเป็นการส่งเสริมให้มีการใช้งานโปรแกรมนี้ให้แพร่หลายยิ่งขึ้น

 

สารานุกรมไทยสำหรับเยาวชน ฉบับออนไลน์

       หลายคนคงจะทราบดีว่าพระบาทสมเด็จพระเจ้าอยู่หัว ทรงมีโครงการสารานุกรมไทยสำหรับเยาวชนเพื่อให้เยาวชนไทยได้ศึกษาความรู้ในสาขาวิชาต่างๆอย่างกว้างขวาง โดยในสารานุกรมไทยฉบับเยาวชนนั้นได้บรรจุสาระความรู้ต่างๆที่จำเป็นสำหรับเยาวชนไทยเอาไว้ ปัจจุบันนี้เพียงแค่มีอินเตอร์เน็ต เพื่อนๆก็สามารถเข้าไปอ่านสารานุกกรมไทยฉบับเยาวชนได้แล้วละครับ ที่ URL : http://kanchanapisek.or.th/kp6/index.html

 

ศึกษาทางไกลผ่านระบบอินเตอร์เน็ต

       หลายคนคงเคยได้ยิน โครงการจัดการศึกษาด้วยระบบทางไกลผ่านดาวเทียมมาบ้างแล้วนะครับ โครงการดังกล่าวเกิดขึ้นเพราะ พระบาทสมเด็จพระเจ้าอยู่หัวต้องการให้เด็กไทยในพื้นที่ต่างๆได้รับการศึกษาที่เท่าเทียมกันดังนั้น โครงการนี้จึงได้เกิดขึ้น โดยเด็กนักเรียนในท้องถิ้นต่างๆที่อยู่ห่างไกลสามารถที่จะเรียนหนังสือโดยผ่านทางระบบโทรทัศน์ผ่านดาวเทียม และในปัจจุบันด้วยเทคโนโลยีอินเตอร์เน็ตความเร็วสูงที่เข้าถึงคนไทยมากขึ้น เด็กไทยจึงสามารถที่จะรับชมการเรียนการสอนดังกล่าวผ่านท่างระบบอินเตอร์เน็ตได้เช่นกัน โครงการดังกล่าวชื่อ "DLF - elearnig เฉลิมพระเกียรติ" เพื่อนๆสามารถที่จะเข้าไปรับชมการเรียนผ่านทางไกลแบบสด หรือรับชมเป็นแบบเทปบันทึกย้อนหลังได้ที่ URL : http://www.dlf.ac.th/dltv/index.php   ครับ อย่าลืมติดตั้งโปรแกรม RealOne Player ด้วยน่ะครับ เพราะต้องใช้โปรแกรมนี้ในการรับชมการเรียนการสอนครับ

 

อ่านคำสอนของพ่อบนอินเตอร์เน็ต

       พระบรมราโชวาท และพระราชดำรัชของพระบาทสมเด็จพระเจ้าอยู่หัวนั้น สามารถที่จะนำมาใช้เป็นแนวทางในการดำเนินชีวิตประจำวันได้ ท่านสามารถอ่านพระบรมราโชวาท และพระราชดำรัสของพระองค์ได้ที่ URL : http://www.onec.go.th/khamphorson/index.html ซึ่งภายในเว็บได้แยกอ่านพระบรมราโชวาท และพระราชดำรัสออกเป็นหมวดหมู่เพื่อให้เหมาะกับการไปใช้ตามความเหมาะสมของผู้อ่านในวัยต่างๆอันได้แก่ เด็ก นักเรียน นักศึกษา และผู้ใหญ่วัยทำงาน

 

เว็บดาวน์โหลดเพลงพระราชพนธ์

       http://kanchanapisek.or.th/royal-music/index.th.html เป็นเว็บรวบร่วมเพลงพระพระราชพนธ์ ของพระบาทสมเด็จพระเจ้าอยู่หัวเอาไว้ ซึ่งเพื่อนๆสามารถเขาไปดาวน์โหลดเนื้อร้อง และไฟล์เสียง ชนิด mp3 ได้จากเว็บนี้ครับ

 

       นอกจากพระอัจฉริยภาพทางด้านคอมพิวเตอร์แล้ว พระบาทสมเด็จพระเจ้าอยู่หัวยังทรงมีพระอัจฉริภาพทางอื่นๆอีกมากมายครับ แต่ไม่ว่าจะเป็นพระอัจฉริยภาพด้านไหนๆพระองค์ก็ทรงใช้ออกมาเพื่อสร้างความเป็นอยู่ที่ดีขึ้นให้กับปวงชนชาวไทย พระองค์ทรงงานอย่างนักหนักมาตลอดระยะเวลา 62 ปี ที่พระองค์ขึ้นครองราชเพื่อที่คนไทยจะได้มีชีวิตและความเป็นอยู่ที่ดีขึ้น ดังนั้นผมคิดว่าคงไม่มีสิ่งใดที่ตอบแทนความเหนื่อยยากพระองค์ท่านได้ดีไปกว่าการที่เราคนไทยทุกคนร่วมกันทำความดีกันเพื่อถวายแด่พระองค์ท่านครับ

 

 

บรรณานุกรม

 

http://www.prdnorth.in.th/The_King/king_it_02.php

 

http://th.wikipedia.org/wiki/%E0%B8%AA.%E0%B8%84.%E0%B8%AA._%E0%B8%9E%E0%B8%A3%E0%B8%B0%E0%B8%A3%E0%B8%B2%E0%B8%8A%E0%B8%97%E0%B8%B2%E0%B8%99

 

http://www.bloggang.com/viewdiary.php?id=yyswim&group=6&month=06-2005&date=08&blog=1

 

http://www.onec.go.th/theking/k009.htm

 

http://www.tddf.or.th/tddf/library/article.php?id=0000351&genreid=01&genre=%B4%E9%D2%B9%A1%D2%C3%E1%BE%B7%C2%EC

 

 

12 พฤศจิกายน 2551

ลอยกระทง

    ลอยกระทง เป็นประเพณีของไทยที่ปฏิบัติสืบต่อกันมาแต่โบราณ งานลอยกระทงเริ่มทำตั้งแต่ กลางเดือน 11 ถึงกลางเดือน 12 ซึ่งเป็นฤดูน้ำหลาก น้ำจะเต็มสองฝั่งแม่น้ำ ที่นิยมมากคือ ช่วงวันเพ็ญเดือน 12 เพราะพระจันทร์เต็มดวง ทำให้แม่น้ำใสสะอาด แสงจันทร์ส่องเวลากลางคืน เป็นบรรยากาศที่สวยงาม เหมาะแก่การลอยกระทง
     เดิมพิธีลอยกระทงเรียกว่า พระราชพิธีจองเปรียงชักโคม ลอยโคม ซึ่งเป็นพิธีของพราหมณ์ เพื่อบูชาพระเป็นเจ้าทั้งสาม คือ พระอิศวร พระนารายณ์ และพระพรหม
    ครั้นคนไทยรับนับถือพระพุทธศาสนา ก็ทำพิธียกโคมเพื่อบูชาพระบรมสารีริกธาตุ พระจุฬามณี ณ สวรรค์ชั้นดาวดึงส์ ลอยโคมบูชาพระพุทธบาท ณ หาดทรายแม่น้ำนัมมทานที

การลอยกระทงตามสายน้ำนี้ นางนพมาศ สนมเอกของพระร่วงเจ้ากรุงสุโขทัย คิดทำกระทงรูปดอกบัว และรูปต่างๆถวาย พระร่วงทรงให้ลอยกระทงตามสายน้ำไหล ในหนังสือ ตำรับท้าวศรีจุฬาลักษณ์ พระร่วงตรัสว่า
    "แต่นี่สืบไปเบื้องหน้า โดยลำดับกษัตริย์ในสยามประเทศ ถึงกาลกำหนดนักขัตฤกษ์วันเพ็ญเดือน 12 ให้ทำโคมลอย เป็นรูปดอกบัวอุทิศสักการบูชาพระพุทธบาทนัมฆทานที ตราบเท่ากัลปาวสาน"
    ครั้นถึงสมัยรัตนโกสินทร์ มีการทำกระทงขนาดใหญ่และสวยงาม ดังพระราชพงศาวดารกรุงรัตนโกสินทร์ ของเจ้าพระยาทิพาราชวงศ์ กล่าวไว้ว่า
    "ครั้นมาถึงเดือน 12 ขึ้น 14 ค่ำ 15 ค่ำ แรมค่ำหนึ่งพิธีจองเปรียงนั้น เดิมได้โปรดให้ขอแรง พระบรมวงศานุวงศ์ฝ่ายหน้า ฝ่ายใน และข้าราชการที่มีกำลังพาหนะมาทำกระทงใหญ่
    ผู้ถูกเกณฑ์ต่อเป็นถังบ้าง ทำเป็นแพหยวกบ้าง กว้าง 8 ศอกบ้าง 9 ศอกบ้าง กระทงสูงตลอดยอด 10 ศอก 11 ศอก ทำประกวดประขันกันต่างๆ ทำอย่างเขาพระสุเมรุทวีปทั้ง 4 บ้าง และทำเป็นกระจาดชั้นๆบ้าง วิจิตรไปด้วยเครื่องสด คนทำก็นับร้อย คิดในการลงทุนทำกระทงทั้งค่าเลี้ยงคนและพระช่าง เบ็ดเสร็จก็ถึง 20 ชั่งบ้าง ย่อมกว่า 20 ชั่งบ้าง"
    ปัจจุบันประเพณีลอยกระทง มีการจัดงานกันแทบทุกจังหวัด ถือเป็นงานประจำปีที่สำคัญ โดยเฉพาะที่จังหวัดเชียงใหม่มีการจัดขบวนแห่กระทงใหญ่ กระทงเล็ก มีการประกวดกระทง และประกวดธิดางามประจำกระทงด้วย
    ส่วนการลอยโคม ชาวบ้านทางภาคเหนือและภาคอีสานยังนิยมทำกัน ชาวบ้านจะนำกระดาษ มาทำเป็นโคมขนาดใหญ่สีต่างๆ ถ้าลอยตอนกลางวัน จะทำให้โคมลอยโดยใช้ควันไฟ ถ้าเป็นเวลากลางคืน ก็จะใช้คบจุดที่ปากโคม ให้ควันพุ่งเข้าในโคม ทำให้ลอยไปตามกระแสลมหนาว เวลากลางคืนแลเห็นแสงไฟโคมบนท้องฟ้า พร้อมกับแสงจันทร์และดวงดาวสวยงามมากทีเดียว

28 ตุลาคม 2551

Mod_Rewrite คืออะไร?

Mod_Rewrite คืออะไร?
Mod_Rewrite คือการแปลง URL ที่ดูยากให้อยู่ในรูปแบบที่เราต้องการ เพื่อประโยชน์หลายด้าน (ซึ่งจะกล่าวถึงต่อไป) และการแปลงเพื่อประโยชน์ด้าน SEO ก็เป็นอีกอันนึงที่มีการนำเอา Mod_Rewrite มาใช้ เพราะเรารู้กันดีว่า Search Engine ไม่ค่อยชอบ pages ที่เป็น dynamic ที่มี query string ยาวเฟื๊อย

ตัวอย่าง URL ที่ยาว และซับซ้อน
โค้ด:

http://www.site.com/viewcatalog.asp?category=hats&prodID=53

เมื่อผ่านการแปลง เราสามารถทำให้สั้นลงได้ดังนี้
โค้ด:

http://www.site.com/catalog/hats/53/

เริ่มทำ Mod_Rewrite
บาง Server ไม่สามารถจะทำ Mod_Rewrite ได้เนื่องจากไม่ได้ติดตั้ง Module Mod_Rewrite ดังนั้นถ้าเราจำเป็นต้องใช้ Mod_Rewrite ก็ต้องตรวจสอบดีๆก่อนเช่า host

.htaccess ไฟล์สำคัญในการทำ Mod_Rewrite
เราจะใช้ไฟล์นี้ในการกำหนด Rule ของการทำ Mod_Rewrite
เริ่มต้นด้วยคำสั่ง

RewriteEngine on

เพื่อเปิดการทำงาน เขียนไว้ในบรรทัดแรกสุดของไฟล์

ต่อไปจะเป็นการนำเอา Mod_Rewrite ไปให้งาน ซึ่งผมจะเริ่มด้วยตัวอย่างง่ายๆ และเขียน Rewrite Rule ง่ายก่อน แล้วก็ยกตัวอย่างต่อไปเรื่อยๆนะครับ

ใช้ Mod_Rewrite ในการทำ Redirects
ถ้าเราต้องการเปลี่ยน location เก่า ไปที่ Location ใหม่แบบถาวร

RewriteEngine on
RewriteRule ^old\.html$ new.html

ถ้าเราเขียนแบบนี้ เมื่อมีการใส่ url เป็น old.html มันก็จะถูกส่งไปที่ไพล์ new.html แต่ผู้เยี่ยมชมยังเห็น URL บน browser เป็น old.html อยู่เหมือนเดิม

อาจจะดูงงๆ อธิบายเพิ่มเติมดังนี้ RewriteRule จะประกอบด้วยกัน 3 ส่วน
1. Call to action
RewriteRule ขึ้นต้นบรรทัด กำหนดว่าบรรทัดนี้เป็น Rewrite Rule
2. Pattern
^old\.html$ เป็นการตรวจสอบ URL ที่ใส่เข้ามาทาง Location Bar ของ Browser ซึ่งจะใช้ regex (Regular Expression) ในการตรวจสอบ (จะอธิบายเพิ่มเติมต่อไป)
3. Rewrite
new.html เป็น URL ที่เราต้องการให้แปลงเป็นอันใหม่
หมายเหตุ: จริงๆมี 4 ส่วน แต่ในตัวอย่างเราใช้ 3 ส่วน

ขออธิบายในส่วนที่ 2 (Pattern) เพิ่มเติมดังนี้ ในส่วนนี้ประกอบด้วยเครื่องหมายสำคัญ 3 อย่างคือ
^old\.html$
- เครื่องหมาย The caret หรือ
^ เป็นการกำหนดจุดเริ่มต้น URL ที่อยู่ภายใต้ direcory ปัจจุบันที่เราจะตรวจสอบ ซึ่งก็คือ directory เดียวกับไฟล์ htaccess
- เครื่องหมาย The dollar sign หรือ
$ ซึ่งบอกจุดสิ้นสุดของการตรวจสอบ Pattern
- อีกเครื่องหมายนึงก็คือ The period หรือ
. จุด ที่อยู่ข้างหน้านามสกุล html ซึ่งเครื่องหมาย จุด นั้นเป็นอักขระพิเศษ ใน regular expressions ซึ่งจะมีความหมายว่า แทนด้วยตัวอักษรใดๆ 1 ตัว (ดูเพิ่มเติมใน regular expressions ต่อจากนี้) แต่ในนี้เราจะตรวจสอบว่า ถ้า Pattern เป็น old.html หรือไม่ เราจึงต้องใส่ \ ซึ่งเป็น escape charactor ไว้ด้วย

เมื่อเราเขียนตามนี้ เมื่อผู้เยี่ยมชมเว็บกรอกมาเป็น old.html server ก็จะทำ transparently redirect ไปที่ new.html โดยที่ผู้เยี่ยมชมเว็บไม่รู้ตัวว่าเป็นข้อมูลอันใหม่แล้ว เพราะ URL บน browser เป็น old.html อยู่เหมือนเดิม

แต่ถ้าเราต้องการให้ URL ที่ปรากฏบน browser เป็น new.html ด้วย เราก็เพียงแต่เติม [R] เข้าไปต่อท้ายบรรทัด ดังนี้

RewriteRule ^old\.html$ new.html [R]

ซึ่ง [R] ก็คือ ส่วนที่ 4 ที่ผมบอกไว้ข้างบน
4. Command Flag
[R] ซึ่งจะเป็นคำสั่งพิเศษกำหนดเงื่อนไขไว้ มีหลายคำสั่งซึ่งจะบอกไว้ตอนท้าย
การใช้ Regular Expressions
จะบอกว่า เป็นส่วนสำคัญที่สุดในการทำ Rewrite และมันก็ทำความความเข้าใจได้ยากพอควร ไม่ต้องห่วงครับ เดี๋ยวผมจะอธิบายเป็นขั้นตอน และยกตัวอย่างประกอบไปเรื่อยๆนะครับ

ตัวอย่างแรก

RewriteRule ^products/([0-9][0-9])/$ productinfo.php?prodID=$1

จะเปลี่ยนจาก

productinfo.php?prodID=11 หรือ productinfo.php?prodID=99

ให้เป็น

products/11/ หรือ products/99/

ดูที่ Pattern จะมีส่วนของที่อยู่ในปีกกาเหลี่ยม [ ] เราเรียกว่า ranges
ในตัวอย่างจะเป็น [0-9] ซึ่งจะใช้ตรวจสอบว่าเป็นตัวอักษรที่อยู่ในช่วง 0-9 ใดๆ
เราสามารถตรวจสอบ ranges อื่นได้ เช่น [A-Z] ตรวจสอบว่าเป็นตัวอักษรตัวใหญ่ตั้งแต่ A-Z
[a-z] ก็เป็นการตรวสอบตัวเล็ก, ถ้า [A-Za-z] ก็ตรวจสอบว่าเป็นทั้งตัวใหญ่และตัวเล็ก เป็นต้น

และใน Pattern ก็จะมีส่วนที่อยู่ในวงเล็บ ( ) เป็นการเก็บค่าที่เราตรวจสอบพบ และตรงตามเงื่อนไข ซึ่งเราสามารถเอาค่านี้ ส่งไปให้ PHP ในส่วนของ Query String ได้ เราเรียกค่าที่ได้จากวงเล็บนี่ว่า back-reference
เราสามารถตรวจสอบและแยก
back-reference ออกได้หลายๆอันใน URL อันเดียว (ดูตัวอย่างต่อๆไป) ซึ่ง back-reference ในวงเล็บแรก เวลาเราอ้างถึงเราก็จะใช้ $1 ส่วนลำดับต่อๆไป ก็จะเป็น $2, $3 ไปเรื่อยๆ

ดังนั้นผู้เยี่ยมชมเว็บ(หรือ bot ก็ได้)ก็จะเห็น url เป็น products/11/ หรือ products/99/ ซึ่ง สั้นและกระชับ โดยหารู้ไม่ว่า เราได้ซ่อน URL ที่ไม่ค่อยสวยงามและอ่านยากไว้เบื้องหลัง

ใส่ / ต่อท้าย
บางครั้งผู้เยี่ยมชมเว็บ อาจจะพิมพ์ URL แค่ products/12 ซึ่งเมื่อเข้าไปตรวจสอบใน Pattern ด้านบน ก็จะไม่ตรง เพราะ Pattern ด้านบนจะต้องมี / ต่อท้ายด้วย มันจึงไม่ทำ transparently redirect ให้เรา
เราก็มีวิธีแก้เหตุการณ์แบบนี้ ซึ่งเราก็จะเขียน Rule ใหม่เพิ่มเข้าไปดังนี้

RewriteRule ^products/([0-9][0-9])$ products/$1/ [R]
RewriteRule ^products/([0-9][0-9])/$ productinfo.php?prodID=$1

ดังนั้น เมื่อ Server ตรวจเจอ products/12 ก็จะเปลี่ยน URL เป็น products/12/ และแสดง URL ให้บน Browser ด้วย เพราะเราใส่ [R] ไว้ด้วย เมื่อเจอเงื่อนไขบรรทัดที่ 2 ก็เลยไม่มีปัญหาใดๆ ซึ่งมันก็จะส่งเป็น transparently redirect ไปที่ productinfo.php?prodID=12 ตามความต้องการของเรา

การใช้ Match Quantifiers
จะเป็นว่าตัวอย่างข้างบน เรากำหนดเป็น ^products/(
[0-9][0-9])$ นั่นหมายความว่า ตัวเลขที่ตามหลัง products/xx ต้องมี 2 ตัวเท่านั้น ซึ่งก็จะเป็นไปได้สูงสุดแค่ 99 แล้วกรณี productinfo.php?prodID=100 ล่ะจะทำอย่างไร?
ในกรณีนี้ เราสามารถใช้ Quantifiers เป็นตัวกำหนดได้ (Quantifiers มีหลายตัว จะอธิบายต่อไปเรื่อยๆ) ดังตัวอย่าง

RewriteRule ^products/([0-9]+)$ products/$1/ [R]

เครื่องหมายบวก + แทนอักษรตั้งแต่ 1 ตัว ถึง n ตัว (ตั้งแต่ 1 ตัวขึ้นไป) ดังนั้น [0-9]+ ก็หมายความว่า เป็นตัวเลข 0-9 ตั้งแต่ 1 หลักขึ้นไป ถ้าเราใส่ products/1 หรือ products/1000 ก็สามารถ Match case นี้ได้แล้วครับ

ข้อมูลเพิ่มเติมของ Rewrite Rule

RewriteRule

Regular expressions

Some hints about the syntax of regular expressions:

Text:
Any single character
[chars] One of chars
[^chars] None of chars
text1|text2 text1 or text2

Quantifiers:
? 0 or 1 of the preceding text
* 0 or N of the preceding text (N > 0)
+ 1 or N of the preceding text (N > 1)

Grouping:
(text) Grouping of text

Anchors:
^ Start of line anchor
$ End of line anchor

Escaping:
\ char escape that particular char

Pattern Matching metacharacter Definitions
\ Use before any of the following characters to escape or null the meaning or it. \* \. \$ \+ \[ \]
^ Start matching at this point
$ End point of the match
. Any character
[] Starts a range
| Starts alternative match this|that would mean match this or that
() starts a back reference point
? match 0 or 1 time Quantifier
+ match atleast 1 or more times Quantifier
* match 0 to infinite times Quantifier
{} match minimum to maximum Quantifier {0,3} match up to 3 times

Range Definitions []
^ Negates the class. [^A-Z]+ means don't match any uppercases
\ Use before any of the following characters to escape or null the meaning or it. [\+]+
- Range for matching [0-9]+ [a-zA-Z]+

Command Flag
[R] Redirect you can add an =301 or =302 to change the type.
[F] Forces the url to be forbidden. 403 header
[G] Forces the url to be gone 401 header
[L] Last rule. (You should use this on all your rules that don't link together)
[N] Next round. Rerun the rules again from the start
[C] Chains a rewrite rule together with the next rule.
[T] use T=MIME-type to force the file to be a mime type
[NS] Use if no sub request is requested
[NC] Makes the rule case INsensitive
[QSA] Query String Append use to add to an existing query string
[NE] Turns of normal escapes that are default in the rewriterule
[PT] Pass through to the handler (together with mod alias)
Skip the next rule S=3 skips the next 3 rules
[E] E=var sets an enviromental variable that can be called by other rules

ข้อมูลจาก http://www.thaiseoboard.com/index.php/topic,3675.0.html