2017-07-31 36 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