好!我已经设置了运行并没有太多麻烦 . 但事情是我无法跳过我的网址中的index.php(localhost / index.php / login正在运行但localhost / login无法正常工作) . 无论如何,我的项目基于CI框架,我之前使用vagrant来托管同一个项目,并且这个案例非常适合 . 我已经检查了apache的rewrite_module,这里是我的.htaccess文件
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]`enter code here`
请从这里帮助我 .
2 回答
首先进入你的项目myproject-application-> config.php
然后在根文件夹中添加.htaccess文件 .
试试这个.htaccess文件代码: