Apache

1个成员

CodeIgnitor的rewrite规则用法

发表于 2017-01-04 3311 次查看
下面简单的介绍一下CodeIgnitor的rewrite规则用法,有需要的朋友可以参考一下。
 代码如下 复制代码

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /codeigniter
  RewriteCond %{REQUEST_URI} ^system.*
  RewriteRule ^(.*)$ /index.php/$1 [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !^(index.php|images|robots.txt|css)
  RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 /index.php
</IfModule>

发表回复
你还没有登录,请先登录注册