I need to redirect the below url
http://localhost/CodeIgniter/index.php?/Welcome/
to
http://localhost/CodeIgniter/Welcome/
and I have tried the below in .htaccess
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?)
RewriteRule ^ /%1 [R=301,L]
The above code taken me to below
http://localhost/CodeIgniter/?/Welcome/
I need to remove that ? mark for avoiding duplicate urls in seo. Can anybody help me