Welcome Guest, Not a member yet? Register   Sign In
CI adds extra ? in URL
#1

[eluser]CoderReborn[/eluser]
When I redirect to '/respond/85', the URL should read: www.mydomain.com/respond/85
But CI creates: www.mydomain.com/?/respond/85
The page is displayed correctly, but the URL is ugly.
Bad for link sharing with others.

How do I fix this?

Note:
- $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";

Thanks!
#2

[eluser]CodeIgniteMe[/eluser]
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
#3

[eluser]CoderReborn[/eluser]
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.





Theme © iAndrew 2016 - Forum software by © MyBB