Welcome Guest, Not a member yet? Register   Sign In
Parameters (?param=value) confusing CI
#1

[eluser]Zarkow[/eluser]
Have a vanilla installation of CI and noticed something interesting.

In another topic I raised a concern that ingoing links, for whatever reason (AdSense, other forums adding tracking or whatever), could be containing parameters and this screwed up CI to the point that it returned 404 page not found. Normally redundant parameters aren't a problem, but CI chokes on them.

Anyway, just noticed something interesting now:
http://example.com/products/tshirts/453.html?about will make CI present the about-page instead of, in this example, a product page.
It acts like the first part of he URI isn't passed at all, the parameter takes precedence. This explains why any oddly added parameter appended by other sites will return 404-pages for their visitors.

So...is this an intended behavior?
Can it be altered? (Perhaps just inactived so parameters are never parsed just ignored? Is ok for this site....)
#2

[eluser]Zarkow[/eluser]
A note is that this site doesn't suffer from it, meaning the official site is not running a vanilla installation.

Test url:
http://ellislab.com/forums/viewforum/53/?test=45&de=43 - works
http://ellislab.com/forums/viewforum/53/?test=45 - works fine.
http://ellislab.com/forums/viewforum/53/?test - works

On my site:
/index.php/welcome/?test=45&ed=324 - works
/index.php/welcome/?test=45 - CI 404
/index.php/welcome/?test - CI 404
#3

[eluser]Grahack[/eluser]
This site runs Expression Engine, not Code Igniter.
If you want to know more about CI urls, have a look at http://ellislab.com/codeigniter/user-gui.../urls.html or even better, CI's source code! More precisely the router class.
#4

[eluser]Pascal Kriete[/eluser]
Grahack pointed you in the right direction.

How urls are treated depends on the uri_protocol config setting. When auto is used, the first attempt is to grab everything after the question mark (system/libraries/uri.php - line 64). Changing it to path_info should eliminate your problem (assuming your host supports path_info).
#5

[eluser]Zarkow[/eluser]
Oh, I see...normally sites use their platform so their site becomes a live demo-board, but ok, then I know.

[quote author="inparo" date="1217188718"](system/libraries/uri.php - line 64).[/quote]

Ok, thanks, I will take a look there!




Theme © iAndrew 2016 - Forum software by © MyBB