RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
1、打开运行时的重写引擎
2、 $1 : 对RewriteRule的(.*)的反向引用。该句表示: 对$1进行 (index\.php|images|robots\.txt)的条件匹配
3、重写 (.*)
到 /index.php/+(.*)的反向引用,[L]代表flags,'last|L
'(结尾规则) 立即停止重写操作,并不再应用其他重写规则。
NOTE:$N 代表RewriteRule 中的反向引用,%N代表RewriteCond 中的反向引用