2017-07-31 54 views
0

我做了一个codeigniter项目并在XAMPP上完美工作。Codeigniter项目上传时未显示所需的页面

但是,当我上传相同并修改了base_url和数据库的详细信息并将其上传到活动服务器时,其显示404 Page Not Found Error。该怎么办???

我的内部应用程序的.htaccess文件包含

<IfModule authz_core_module> 
    Require all denied 
</IfModule> 
<IfModule !authz_core_module> 
    Deny from all 
</IfModule> 
+0

的可能的复制https://stackoverflow.com/questions/45180386/ci-modules-working-on-local-but-给404未找到服务器/ 45181199#45181199 –

+0

请确保更新.htaccess外侧应用程序文件夹,并尝试在答案中建议的配置 – Eiaddar

+0

因此,我应该从应用程序文件夹中剪切该.htaccess文件并粘贴它就在应用程序之外(在主目录中)@Eiaddar – pokemon

回答

0

上传htaccess文件 如果已经上传... 检查重写国防部使用PHP的信息

感谢

+0

更新了问题,请现在看看。 – pokemon

0

几件事情需要在将项目移动到活动服务器时需要考虑。 1-检查Apache服务器版本并编写相应的.htaccess文件 如果您正在运行在2.4版本*试试这个的.htaccess配置:

RewriteEngine on 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

其他

<Directory /var/www/> 
     AllowOverride All 
     Order allow,deny 
     allow from all 
</Directory> 

2-检查mod_rewrite活施维雅 3-检查,如果所有需要的extention如open_ssl在PHP

正在运行
+0

更新了问题,请现在看看。 – pokemon

0

我以前遇到同样的问题。我得到了这些解决方案:

1.Configure你的.htaccess

RewriteEngine on 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

2.检查你的路由。

3.确保到大写控制器和模型文件..,

+0

更新了问题,请现在查看。我的.htaccess文件有不同的内容,位于应用程序目录中 – pokemon