RewriteEngine on # I know it will make RewriteEngine on.
RewriteCond %{REQUEST_FILENAME} !-f # So, what is it?
RewriteCond %{REQUEST_FILENAME} !-d # So, what is it?
RewriteRule .* index.php/$0 [PT,L] # So, what is it?
答案 0 :(得分:0)
这看起来非常像Drupal的重写规则。非常简单:
打开重写引擎
RewriteEngine on
如果提供的URI未指向实际文件
RewriteCond %{REQUEST_FILENAME} !-f
或目录
RewriteCond %{REQUEST_FILENAME} !-d
然后将整个URI传递给index.php脚本
RewriteRule .* index.php/$0 [PT,L]