PHP+;CodeIgniter,没有MVC的RestFul Url?

PHP+;CodeIgniter,没有MVC的RestFul Url?,php,codeigniter,Php,Codeigniter,我会在我的新项目中使用CodeIgniter,但我只使用helper函数,所以 我可以作为CodeIgniter restful Url函数运行php脚本,但不能在MVC中运行吗 或者我可以用Apache rewrite mod来代替?如果您不需要使用CodeIgniter,Apache rewrite会更合适 在.htaccess文件中,您可以使用如下内容: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{

我会在我的新项目中使用CodeIgniter,但我只使用helper函数,所以 我可以作为CodeIgniter restful Url函数运行php脚本,但不能在MVC中运行吗


或者我可以用Apache rewrite mod来代替?

如果您不需要使用CodeIgniter,Apache rewrite会更合适

.htaccess
文件中,您可以使用如下内容:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?page=$1 [PT]
然后您可以使用
http://yoursite.com/whatever
$\u GET['page']
将等于
任何内容