Changes
Title
unchanged
Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php
Category
unchanged
Tips
Yii version
unchanged
Tags
unchanged
Yii2, beautiful url, redirect home page, ignore index.php
Content
changed
First of all, install yii2 basic template according below link:
[How to install yii2 basic template](http://www.yiiframework.com/doc-2.0/guide-start-installation.html "how to install yii2 basic")
Then, normally you have to use http:\\localhost\yii2-basic\web to launch your homepage.
And our target is **both** [http:\\localhost\yii2-basic ](http:\\localhost\yii2-basic "http:\\localhost\yii2-basic ") and [
Your text to link herehttp:\\localhost\yii2-basic\web...](http:\\localhost\yii2-basic\web "http:\\localhost\yii2-basic\web") can launch your home page.
**Steps:**[...]
In addition, you can use beautiful url too:
**Step:**
Add below code
```php
'urlManager' => [[...]