CodeIgniter Forums

Full Version: How to redirect URLs with '?' but no query string parameters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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?


El Forum

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

El Forum

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