Revision #146 was created by rackycz on Oct 6, 2019, 9:38:15 PM.
web folder
Content
[...]
Note that **Yii::$app->request->baseUrl** returns "/myProject/web". No trailing slash.
**How to redirect web to subfolder /web**
---
Yii 2 has the speciality that index.php is hidden in the web folder. I didnt find in the official documentation the important info - how to hide the folder, because user is not interested in it? ...
Our demo applicatinon is placed in folder:
- C:\xampp\htdocs\basic\web\index.php
[...]
```
... it only adds the word "web" into all URLs. But first we have to remove the word from URLs. Open file config/web.php and find section **request**. Add attribute **baseUrl**:
```
[...]
],
```
Now things will work for you. But it might be needed to use different value for devel and producticve web locationenvironment.
I will test this and if I find problems and solutions I will add them.
**Auto redirection from login to desired URL **
---