I have removed index.php from URL in Codeigniter. But I can access URL with both ways like.
abc.com/index.php/123
abc.com/123
But I need if somebody type abc.com/index.php/123 it will be redirected to the abc.com/123
What I did below code i written in .htaccess
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
And in config.php i have removed index.php
$config['index_page'] = '';
But still i can open url with both ways