J
J
Jonibek Kodirov2018-07-01 13:31:40
Yii
Jonibek Kodirov, 2018-07-01 13:31:40

All the same, how to humanly set up the CNC on yii2?

How easy and humanly to set up the CNC on yii2? How many ways I googled and each of them has different approaches and none of them work! I started learning yii2 just yesterday. After Django, the Yii approach just seems absurd.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-07-01
@php10

Too vague question.
Here in this article https://github.com/yiisoft/yii2/blob/master/docs/g... everything is chewed in great detail.
Are you using Nginx or Apache?

S
Sergey, 2018-07-01
@butteff

1. You need to take apache or nginx config from here (at the end of the page).
2. In the web application config, enable pretty urls, for example, like this:

'components' => [
    // ...
    'urlManager' => [
        'class' => 'yii\web\UrlManager',
        // Hide index.php
        'showScriptName' => false,
        // Use pretty URLs
        'enablePrettyUrl' => true,
        'rules' => [
        ],
    ],
    // ...
],

Inside rules, you can specify rules (for example, regular expressions for which a different action should work, or, for example, there may be a different alias.
Here is a good article on the topic, from where the example was taken.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question