Welcome Guest, Not a member yet? Register   Sign In
URI problem
#1

[eluser]mathg[/eluser]
Hello I'm using URI language identifier to parse my URL and get the language of my site.

The problem is that CI doesn't find any URI with this line of code.
Code:
$lang_abbr = current($RTR->uri->segments);

If I var dump that line I get bool(false). If I remove the "current()" and just var_dump the rest I get this : array(0);

The current URL in the browser is www.mysite.com/fr but it acts like there is not "fr" in the url.

Here are my settings. Is there a problem with my routing or anything else? Thank you.

.htaccess
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|public|gestion|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

routes.php
Code:
$route['default_controller'] = "main";
$route['scaffolding_trigger'] = "";

$route['(\w{2})/(.*)'] = '$2';
$route['(\w{2})'] = $route['default_controller'];

By the way The 2 last lines are from the URI language wiki, I copied them there because that's what it says to do, but I don't understand thoses 2 lines. Could anyone explain them to me please?

Thanks


Messages In This Thread
URI problem - by El Forum - 11-15-2010, 09:01 AM
URI problem - by El Forum - 11-15-2010, 10:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB