当前位置:首页 > PHP教程 > Apach > 列表

CodeIgnitor的rewrite规则用法

发布:smiling 来源: PHP粉丝网  添加日期:2013-11-23 22:26:53 浏览: 评论:0 

下面简单的介绍一下CodeIgnitor的rewrite规则用法,有需要的朋友可以参考一下。

  1. <IfModule mod_rewrite.c> 
  2.   RewriteEngine On 
  3.   RewriteBase /codeigniter 
  4.   RewriteCond %{REQUEST_URI} ^system.* 
  5.   RewriteRule ^(.*)$ /index.php/$1 [L] 
  6.   RewriteCond %{REQUEST_FILENAME} !-f 
  7.   RewriteCond %{REQUEST_FILENAME} !-d 
  8.   RewriteCond $1 !^(index.php|images|robots.txt|css) 
  9.   RewriteRule ^(.*)$ index.php/$1 [L] 
  10. </IfModule> 
  11. <IfModule !mod_rewrite.c> 
  12.   ErrorDocument 404 /index.php 
  13. </IfModule> 

Tags: CodeIgnitor rewrite 规则

分享到: