here’s the issue. http ://localhost/ loads the site. works perfectly. i have an image there using the img tag in HTML. it loads. then i click “home” or “about” and suddenly it changes to “alternate text” because it can’t find it.
basically: http ://localhost/ works with everything loading. http ://localhost/site/index (the same exact page) does not load correctly. the CSS code and all are still there. information and everything from the view. but the image isn’t found and instead displays the broken image link. not quite sure what’s up.
data! so, img link in question <p><img src="includes/websitebutterfly.jpg" alt="альтернативный текст"></p> (its in a folder i made called includes. and it loads normally until any link on the side is followed… so, its in the right place. )
so… that means its a config error.
configs! in frontend/config/main.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-practical-frontend',
'name' => 'My Company',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'frontend\controllers',
'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',
],
],
'params' => $params,
];
common/config/main.php
<?php
return [
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
]
],
];
other thing to note: debug tool doesn’t load at all… even when loading localhost straight up and everything else loads.