Welcome Guest, Not a member yet? Register   Sign In
URLs have embedded "?" after updating 172 to 202
#1

[eluser]Kenneth Allen[/eluser]
Today I attempted to update my local test web site from CI 1.72 to 2.02 following the steps notes on the update page.

I moved my application folder to the root and replaced all of the system folder. I then made some small changes to the config.php file to add in a couple of new items from the 2.02, changed the model and controller base class names and set an encryption string. When I invoked my first page it looked OK, but… the URLs were different!

For example, the call
Code:
anchor('/season/'.$season->id, $season->Name)
should result in a URL like
Code:
<a href="http://d2testsite/SMaLL/season/5">Spring 2011</a>
, but instead generates the URL
Code:
<a href="http://d2testsite/SMaLL/?/season/5">Spring 2011</a>
.

When I click on one of these links then it simply redirects to the base page (up to the SMaLL folder).

I tried changing the code to use site_url() instead of anchor() call, but the results were the same.

I do have enable_query_strings enable since some URLs do pass parameters in this manner.

It is the insertion of the extra "?/" text that I do not understand, nor can I eliminate it. Is there some other change that I need to make as well?
#2

[eluser]Narkboy[/eluser]
Code:
$config['allow_get_array']    = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger']    = 'c';
$config['function_trigger']    = 'm';
$config['directory_trigger']    = 'd'; // experimental not currently in use

This is the config section of CI2.02. Notice the addition of 'allow get array'? You want that TRUE, but query strings FALSE.

Under 2.02, get_array allows you to pass data via GET - query_strings allows you to call controllers and functions via GET. If query_strings is TRUE, then CI looks for the URL as GET rather than segments.

Make sense?

/B




Theme © iAndrew 2016 - Forum software by © MyBB