Difference between #3 and #4 of
Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

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' => [
[...]
1 0
5 followers
Viewed: 76 934 times
Version: 2.0
Category: Tips
Written by: Scott_Huang
Last updated by: Scott_Huang
Created on: Oct 31, 2014
Last updated: 10 years ago
Update Article

Revisions

View all history