<?php
/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yiibootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<?php
namespace frontend\assets;
use yii\web\AssetBundle;
/**
* Main frontend application asset bundle.
*/
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'public/css/style.css',
];
public $js = [
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
}
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
// 'css/site.css',
// 'font/bootstrap/css/bootstrap.min.css',
'font/fontawesome/css/font-awesome.min.css',
'font/animatecss/animate.min.css',
'font/bootstrap-datepicker/css/bootstrap-datepicker.min.css',
'font/animated-headlines/animated-headlines.css',
'css/styles.css',
];
public $js = [
// 'font/jquery/jquery-1.11.3.min.js',
// 'font/bootstrap/js/bootstrap.min.js',
'font/bootstrap-datepicker/js/bootstrap-datepicker.min.js',
'js/animated-headlines.js',
'js/custom.js',
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapPluginAsset',
];
}
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^font/(.*)$ web/font/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^img/(.*)$ web/img/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
</IfModule>
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^/.*
RewriteRule ^(.*)$ web/$1 [L]
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ web/index.php
</IfModule>
use \yii\web\Request;
$baseUrl = str_replace('/web', '', (new Request)->getBaseUrl());
'components' => [
'request' => [
'baseUrl' => $baseUrl,
]
]