但是,在将该项目移动到debian服务器之后,它说:
在此服务器上找不到请求的URL /index.php/Admin。我想问一下,为什么我得到这样的输出?尽管我使用相同的代码运行了同一个项目。如何解决这个问题?
谢谢...
解决方案首先启用mod_rewrite,然后使用以下命令重新启动apache2:
sudo a2enmod rewrite sudo service apache2 restart然后使用命令打开apache conf文件:
sudo gedit /etc/apache2/apache2.conf取消评论下方的评论
AccessFileName .htaccess然后在apache2.conf中找到这些行
< Directory / var / www /> 选项索引FollowSymLinks AllowOverride无要求全部授予
这里更改行AllowOverride None to AllowOverride All并保存此文件。
现在,您的问题已解决。
I want to ask. First of all, I will tell that I've develop an application use codeIgniter on my windows dekstop. And it clear and run completely.
But, after I move that project to debian server, it said :
The requested URL /index.php/Admin was not found on this server.I want to ask, why I got an output like that? Eventhough I ran the same project with the same code. How can I do to fix this issue?
Thanks...
解决方案First of all enable mod_rewrite then restart apache2 using following commands:
sudo a2enmod rewrite sudo service apache2 restartthen open apache conf file using command:
sudo gedit /etc/apache2/apache2.confuncomment below line if it is commented
AccessFileName .htaccessthen find these lines in apache2.conf
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all grantedhere change the line AllowOverride None to AllowOverride All and save this file.
Now, your issue is resolved.
更多推荐
为什么codeIgniter在此服务器上显示请求的URL?
发布评论