How to redirect URLs with '?' but no query string parameters

I was using Codeigniter for my site which was hosted on GoDaddy earlier. For some reason, the standard CI URLs didn't work as expected.
e.g. -
Hence I had to update one of the core CI libraries such that it generates URL in the form -

Now all the URLs cached in google are in the format mentioned above.
I have now changed the host and also upgraded my CI installation to 2.0.3.
The new host supports standard SEF URLs.
What I need to achieve is get rid of the index.php segment from the URL which can be easily done using htaccess. Though I need to ensure that all the google cached URLs redirect to corresponding new URLs without index.php? segment. For example - redirects to

Can anyone please help me out with it?


Something like this.
Place this code in your .htaccess file:
redirect 301 /old/old.php

Thanks for the reply. Though I tried it but it unfortunately doesn't work for the rule below -
redirect 301 /index.php?album

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.