I downloaded a PHP script written using CodeIgniter. when I run it from the localhost, on going to the admin folder, it shows localhost again. Also when running from my web
I know I am late, but this will help someone.
Check if rewrite engine is enabled.
If not, enable rewrite engine and restart server.
sudo a2enmod rewrite
sudo service apache2 restart
This works fine for me
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule >
You're trying to remove index.php from your site URL's, correct?
Try setting your $config['uri_protocol']
to REQUEST_URI
instead of AUTO
.
remove comment in httpd.conf (apache configuration file):
LoadModule rewrite_module modules/mod_rewrite.so
The problem with 500 errors (with CodeIgniter), with different apache settings, it displays 500 error when there's an error with PHP configuration.
Here's how it can trigger 500 error with CodeIgniter:
Please check your apache error logs, there should be some interesting information in there.