Answer the question
In order to leave comments, you need to log in
Yii2 No input file specified on hosting?
Hello. On local, the application on yii2 advanced works fine. But after the transfer to hostinger.ru, the transition to the backend 'broke'.
After authorization on the backend, the admin has the choice to proceed to editing the necessary table, which are generated via gii.
<ul class="list-admin">
<li> <a href="index.php/catalog"> Каталог </a> </li>
<li> <a href="index.php/section"> Категория </a> </li>
<li> <a href="index.php/product"> Продукт </a> </li>
<li> <a href="index.php/news"> Новости </a> </li>
<li> <a href="index.php/review"> Отзывы </a> </li>
</ul>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
<?php
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'),
require(__DIR__ . '/../../common/config/params-local.php'),
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
return [
'id' => 'app-backend',
'language' => 'ru-RU',
'basePath' => dirname(__DIR__),
'controllerNamespace' => 'backend\controllers',
'bootstrap' => ['log'],
'modules' => [],
'components' => [
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
//'suffix' => '.html',
'rules' => [
'' => 'site/index',
'<action>'=>'site/<action>',
],
],
'assetManager' => [
'basePath' => '@webroot/assets',
'baseUrl' => '@web/assets'
],
'request' => [
'baseUrl' => '/admin'
]
],
'params' => $params,
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question