• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Routing and URI segments conflict

#1
[eluser]keevitaja[/eluser]
Hi,

url is http://olly/ru/katus/3
controller is katus.php
method index()

routes.php file:

Code:
$route['^(ru|en)/katus/(:num)'] = "katus/index/$1";

when i try to get the uri segments or uri string, i get anomalous results:

uri_string():
Code:
string(10) "ru/katus/3"

ruri_string():
Code:
string(15) "/katus/index/ru"

segment_array():
Code:
array(3) {
  [1]=>
  string(2) "ru"
  [2]=>
  string(5) "katus"
  [3]=>
  string(1) "3"
}

rsegment_array():
Code:
array(3) {
  [1]=>
  string(5) "katus"
  [2]=>
  string(5) "index"
  [3]=>
  string(2) "ru"
}

shouldn't third segment in ruri_string() and rsegment_array() be 3? in my case it is ru. am i missing something?

#2
[eluser]keevitaja[/eluser]
my bad Sad route was incorrect.

Code:
$route['^(ru|en)/katus/(:num)'] = "katus/index/$2";


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.