【发布时间】:2013-08-14 16:22:18
【问题描述】:
我正在处理这个 URL。我正在开发一个拥有此 URL 的项目:
http://localhost/franca/menkenPh/index.php/controller/argument/argument
但我需要我变成这样的东西:
http://localhost/franca/menkenPh/0/cirug
我怎样才能做到这一点?
我尝试在 .htaccess 上执行此操作:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /franca/menkenph/
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
但是当我转到 URL 时,我希望它给我 page not found 错误,当我这样做时:
http://localhost/franca/menkenPh
它告诉我参数被遗漏了。
有什么线索吗?
【问题讨论】:
-
如果你解决了这个问题,我们会遇到很多问题,请分享到stackoverflow.com/questions/18236711/…
-
确保
mod_rewriteis enabled。
标签: php codeigniter mod-rewrite