1

I am trying to redirect my domain.com to domain.com/index. I tried both via route.php and httaccess. but not working.

route.php

$route[''] = "front_controllers/home/home_controller/index";
$route['index'] = "front_controllers/home/home_controller/index"; 

httaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ index [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

I past i added some rules in htaccess to remove "index.php" of codeIgniter.

I want to load my homepage which is on "index" on loading of domain.com

i already removed index.php , problem is i unable to access localhost/codeIgniter it gives 404 error

localhost/codeIgniter/index working fine as shown in route.php

0 Answers0