Difference between #149 and #150 of
Yii v2 snippet guide

Revision #150 has been created by rackycz on Oct 6, 2019, 9:52:17 PM with the memo:

web folder
« previous (#149) next (#151) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
'request' => [
// 'cookieValidationKey' => ...
'baseUrl' => '/basic', // add this line
],
```
Now things will work for you. But it might be needed to use different value for devel and productive environment. Productive web is usually in the root-folder so baseUrl should be en empty string.
 I did it like this:
 
 
```php
 
$baseUrlWithoutWebFolder = "";
 
if (YII_ENV_DEV) {
 
  $baseUrlWithoutWebFolder = '/basic';
 
}
 
 
// ...
 
 
'baseUrl' => $baseUrlWithoutWebFolder
 
```


I will test this and if I find problems and solutions I will add them.

**Auto redirection from login to desired URL **
---
[...]
7 0
4 followers
Viewed: 259 106 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 7 months ago
Update Article

Revisions

View all history