Reputation: 59
Currently my url is http://localhost/halodocnew/frontend/web/index.php?r=site%2Flogin
I want to change name folder frontend
to client
for all action.
Please help me
Thank all so much
Upvotes: 1
Views: 3392
Reputation: 110
Suppose you want to rename backend to admin the follow the following steps
1)Rename backend folder to admin
2)Update Bootstrap.php under common/config/Bootstrap.php
Yii::setAlias('@backend', dirname(dirname(__DIR__)) . '/backend');
To
Yii::setAlias('@admin', dirname(dirname(__DIR__)) . '/admin');
3)Update site controller namespace under admin/controller/siteController.php backend\controllers;
to namespace admin\controllers;
4) Update main.php ubder admin/config
'controllerNamespace' => 'backend\controllers'
to 'controllerNamespace' => 'admin\controllers'
Upvotes: 2
Reputation: 9652
For Quick solution:
Copy and Paste your frontend
folder in same directory and rename it to client
Open halodocnew\common\config\bootstrap.php
Add alias: Yii::setAlias('client', dirname(dirname(__DIR__)) . '/client');
Access in browser:
http://localhost/halodocnew/client/web/index.php
Another Solution:
halodocnew\environments\dev\
frontend
in this folder and rename it to client
.halodocnew\environments\prod\
frontend
in this folder and rename it to client
.halodocnew\environments\index.php
'Development' => [
'path' => 'dev',
'setWritable' => [
'backend/runtime',
'backend/web/assets',
'Development' => [
'path' => 'dev',
'setWritable' => [
'backend/runtime',
'backend/web/assets',
'client/runtime',
'client/web/assets',
Do same above for 'Production' => [
'path' => 'prod',
Go into your project root directory and run php init
web
and veiws
folder from frontend
to client
halodocnew\common\config\bootstrap.php
Yii::setAlias('client', dirname(dirname(__DIR__)) . '/client');
http://localhost/halodocnew/client/web/index.php
I don't think it is sooper dooper solution but I used these methods =:)
Upvotes: 1