PHP+;CodeIgniter,没有MVC的RestFul Url?
我会在我的新项目中使用CodeIgniter,但我只使用helper函数,所以 我可以作为CodeIgniter restful Url函数运行php脚本,但不能在MVC中运行吗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 %{
或者我可以用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']
将等于任何内容