@b[] $xUri[^request:uri.split[/;lh]] $txUri[education,medecine,premises] $txUri[^txUri.split[,]] ^if(^txUri.locate[piece;$rUri.1]){ ^redirect[/$rUri.1/?$request:query] }{ ^if($xUri.1 eq 'en' && -d '/$xUri.2/'){ ^redirect[^request:uri.mid(3)] }{ $tPage[^table::sql{select id, title_ru, title_en, text_$sLang as text from pages where uri='$rUri.1'}] ^if(!$tPage){ ^404[] }{ ^tTitle.append{$tPage.title_$sLang} ^if($tPage.id==1){^about_anketa[]} ^untaint{$tPage.text} } } } @redirect[url] $response:location[^untaint{$url}] @about_anketa[]