为什么codeIgniter在此服务器上显示请求的URL? [英] Why codeIgniter show the requested URL was not found on this server?
问题描述
但是,在将该项目移动到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 restart
then open apache conf file using command:
sudo gedit /etc/apache2/apache2.conf
uncomment below line if it is commented
AccessFileName .htaccess
then find these lines in apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
here change the line AllowOverride None to AllowOverride All and save this file.
Now, your issue is resolved.
这篇关于为什么codeIgniter在此服务器上显示请求的URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!