室外桃源 发表于 2013-4-21 17:49:12

CI 自定义重写问题(求助)

本人已经rewrite index.php

但我还想 把 .com/about/view/3   重写成 .com/about/view/id-3.html.

我试过routes 但是还不行,rewrite规则也没写出来

我是在这样写的(当时没有效果)

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|nineadmin|ckeditor|ckfinder|attachment|swfupload|style)
RewriteRule ^(.*)$ /index.php/$1

RewriteEngine on
RewriteRule ^about/overview/id_(+)\.htmlabout/overview/$1

能有人帮帮我吗?

青鸟kai 发表于 2013-5-10 09:39:35

$route['com/about/view/(:num)'] = com/about/view/id-$1.html,走一个试试
页: [1]
查看完整版本: CI 自定义重写问题(求助)