【发布时间】:2012-09-10 09:26:00
【问题描述】:
我想重写codeigniter url rewrite的代码。
我使用了以下代码。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /test/index.php?/$1 [L]
RewriteRue ^list/shows/cid-([0-9]+).html /list/shows?cid=$1
注意:“test”是我的网站目录。
它在删除 index.php 时效果很好。但它不适用于url重写
我要http://example.com/test/list/shows?cid=1
成为
http://example.com/test/list/shows/cid-1.html
提前致谢。
【问题讨论】:
-
有错字吗?
RewriteRule。提示:改为在最后一行添加[L]。 -
去掉[L]也没用
-
您是否考虑从
index.php-removal 规则中删除??我认为它的解析方式存在冲突-即(有效地)有两个问号。
标签: .htaccess codeigniter mod-rewrite rewrite