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

Revision #149 has been created by rackycz on Oct 6, 2019, 9:46:38 PM with the memo:

web folder
« previous (#148) next (#150) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
Note that **Yii::$app->request->baseUrl** returns "/myProject/web". No trailing slash.

**How to redirect web to subfolder /web**
---
Note: If you are using the advanced demo app, [this](https://stackoverflow.com/questions/37451324/how-to-change-base-url-and-enable-prettyurl-in-yii2) link can be interesting for you.
 
 
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 application is placed in folder:
- C:\xampp\htdocs\basic\web\index.php

Now you will need 2 files named .htaccess
[...]
2 0
1 follower
Viewed: 11 710 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 30 days ago
Update Article

Revisions

View all history