Advanced template with shared hosting

I am following the guide at - http://www.yiiframework.com/doc-2.0/guide-tutorial-shared-hosting.html

My folder layout is as follows

www

admin

backend

common

console

environments

frontend

I moved the content from frontend/web to www and the backend/web into www/admin

I used the .htaccess in the sample


[size=2]Options +FollowSymLinks[/size]

IndexIgnore */*


RewriteEngine on


# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d


# otherwise forward it to index.php

[size=2]RewriteRule . index.php[/size]

Next adjust the paths in index.php and index-test.php


[size=2]<?php[/size]

defined('YII_DEBUG') or define('YII_DEBUG', true);

defined('YII_ENV') or define('YII_ENV', 'dev');


require(__DIR__ . '/vendor/autoload.php');

require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');

require(__DIR__ . '/common/config/bootstrap.php');

require(__DIR__ . '/config/bootstrap.php');


$config = yii\helpers\ArrayHelper::merge(

    require(__DIR__ . '/common/config/main.php'),

    require(__DIR__ . '/common/config/main-local.php'),

    require(__DIR__ . '/config/main.php'),

    require(__DIR__ . '/config/main-local.php')

);


$application = new yii\Application($config);

[size=2]$application->run();[/size]

I am not sure how to alter the paths correctly to get the site to come up. Can anyone advise please?

Unless you can set two document roots (2 hosting accounts) the advanced may not be for you.

This setup is intended to have two domains, or a domain and subdomain with separate document roots. It is for using a shared codebase with two different ‘applications’ - usually a public facing site and administrative backend.

You can achieve a similar approach with the basic app using an /admin module if on shared hosting.