2017-07-25 38 views
0
RewriteEngine On 
RewriteEngine On 
<IfModule mod_rewrite.c> 
RewriteEngine On 

#RewriteCond %{HTTPS} off 
#RewriteCond www.%{HTTP_HOST} ^(?:www\.)?(www\..+)$ [NC] 
#RewriteRule^https://%1%{REQUEST_URI} [NE,L,R] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule> 

這HTTP錯誤500是.htaccess文件 和我的配置文件是這樣的網站名稱目前無法處理此請求。在笨

$config['base_url'] = 'http://website.org/'; 
    $config['index_page'] = ''; 

這是工作完美公測服務器上,但讓現場服務器的500錯誤。

+0

什麼只有一次使用行'RewriteEngine On' –

+0

嘗試[this](https://stackoverflow.com/questions/45125796/internal-server-error-in-codeigniter-on-live-主機/ 45125858#45125858),檢查'.htaccess','db'和'config'文件 – Regolith

+0

你總是在500內部Se rver錯誤,是你去檢查相關的日誌文件。 (-1仍然必須向「軟件工程師」解釋) – CBroe

回答

0

檢查下面提到的代碼.htaccesscodeigniter

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

#'system' can be replaced if you have renamed your system folder. 
RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ index.php/$1 [L] 

#Checks to see if the user is attempting to access a valid file, 
#such as an image or css document, if this isn't true it sends the 
#request to index.php 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

#This last condition enables access to the images and css folders, and the robots.txt file 
RewriteCond $1 !^(index\.php|(.*)\.swf|images|robots\.txt|css|js|docs|cache) 
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule> 

讓我知道如果你仍然有500錯誤。

0

您需要將下面的代碼添加到您的.htaccess文件中。從PHP; mod_rewrite的刪除(;)> -

<IfModule mod_rewrite.c> 
RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* index.php?/$1 [PT,L] 
</IfModule> 
php_value upload_max_filesize 100M 
php_value post_max_size 100M 

這一點,你需要檢查之前Mod.rewrite已經在你的直播服務器啓用如果沒有的話,你需要從

php.ini中啓用.ini文件

相關問題