'website name is currently unable to handle this request. HTTP ERROR 500 in codeigniter
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>
This is the .htaccess file and my config file is this
$config['base_url'] = 'http://website.org/';
$config['index_page'] = '';
This was working perfect on beta server but getting 500 error on live server.
Solution 1:[1]
Check below mentioned code for .htaccess in codeigniter.
<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>
Let me know if you still have 500 Error.
Solution 2:[2]
You need to add this below code :in your .htaccess files.
<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
Before this you need to check is Mod.rewrite has enabled in your live server if not then you need to enable from
Php.ini -> ;mod_rewrite to remove (;) from php.ini files
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shyam Shingadiya |
| Solution 2 | Madhur |
