J
J
Juster2014-10-10 07:18:45
Emigration and immigration
Juster, 2014-10-10 07:18:45

Which European country to choose for work?

Please advise the country:
1) Where gamedev is developed.
2) Where he speaks English, and in a NOT (!) British accent.
Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Fedorov, 2016-11-04
Reytarovsky @Antonchik

Since you have the same format for both links, domain.com/, you need to independently determine what the current value refers to. Therefore, you have the following options:
1. Make your own URL rule that will analyze the incoming value using some algorithm and determine which system component should redirect the request
2. Define url rules as follows

'/<alias:(admin|firstmodule|secondmodule)>' => '/<alias>',  // в круглых скобках ссылки на корень модуляя
'/<alias>' => 'page/default/index',

If I'm not mistaken, yii2 searches for rules until the first matching one, so we say that if value is included in the list of given modules, we do nothing with it, and if it is not included, sends a request to the default controller of the page module

B
Boris Yakushev, 2016-11-04
@za4me

You can configure it through the rules in the url manager.

M
Maxim Timofeev, 2016-11-04
@webinar

Maxim Fedorov gave a very correct example. But if it is difficult to understand, you can directly:

'admin'=>'admin/default/index',
'o-kompanii'=>'page/default/index',

But your structure will impose restrictions on the use of alias in the page, so I would do for pages not /o-kompanii and /admin but /page/o-kompanii and /admin, or I would take admin to a subdomain
Or, as an option, I would add to all pages " page-", then like this:
'admin' => 'admin/default/index',
'page-<alias>' => 'page/default/index',

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question