CodeIgniter Forums

Full Version: CI adds extra ? in URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

When I redirect to '/respond/85', the URL should read:
But CI creates:
The page is displayed correctly, but the URL is ugly.
Bad for link sharing with others.

How do I fix this?

- $config['enable_query_strings'] is set to TRUE in the config.php file
- I've setup the following URI route rule: $route['respond/(.+)'] = "respond/index/id/$1";


El Forum

Why do you have $config[‘enable_query_strings’] set to TRUE? Do you need query strings? If not, you can safely set it to FALSE

El Forum

Ok - I changed $config[‘enable_query_strings’] back to FALSE and that resolved the issue.

But I do need query strings occasionally.
So I just retrieve them from the $_GET array directly instead of using the CI->input class.