CodeIgniter Localhost redirecting to xampp homescreen CodeIgniter Localhost redirecting to xampp homescreen codeigniter codeigniter

CodeIgniter Localhost redirecting to xampp homescreen


You need to set RewriteBase in your .htaccess file in your folder, which is in your case ci.

So you would currently have

<IfModule mod_rewrite.c>    RewriteEngine On    RewriteBase /

You should change it to

<IfModule mod_rewrite.c>    RewriteEngine On    RewriteBase /ci/

And that's it. It will work now.


Have a look at RewriteBase directive and then try this:

RewriteEngine onRewriteBase /hr/RewriteCond %{REQUEST_URI} !^(index\.php|images|robots\.txt)RewriteRule ^(.*)$ /index.php/$1 [L]

Plus, you need to make sure that Apache's rewrite module is enabled:

# Check if it's enabled:apachectl -M | grep rewrite# You might need sudo here:a2enmod rewrite# On platforms that a2enmod is not available, you need # to open up your httpd.conf file and uncomment the line# that looks like this:LoadModule rewrite_module libexec/mod_rewrite.so