hwaty 发表于 2014-9-16 11:02:46

CI 重定向问题求解

源地址:http://example.com/news/index/22/1
希望重定向的地址:http://example.com/news--22_1.html
.htaccess文件:
RewriteEngine on
RewriteCond $1 !^(index\.php|static|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1

希望各位大侠帮忙~

sparkinzy 发表于 2014-9-18 23:18:09

你完全不用这么写!!你直接写route.php配置一下~就可以了

57sy.com(隐身中 发表于 2014-9-22 09:28:07

直接router.php 即可

57sy.com(隐身中 发表于 2014-9-22 09:33:28

在router.php 里面新增这一句即可 !!!!!$route['news--(:num)_(:num)'] = "news/index";
页: [1]
查看完整版本: CI 重定向问题求解