1.
httpd.conf中确保
LoadModule rewrite_module modules/mod_rewrite.so
2.
<Directory "C:/php/mywork">
…
AllowOverride All
…
</Directory>
3.实验一
建立一个.htaccess文件,目的是将alice.html=>bob.html
RewriteEngine on RewriteRule ^alice.html$ bob.html
4.实验二
code igniter去掉index.php的例子
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ test/index.php/$1 [L]