I am using yii2.I have problem related to url structure. How I can change URL structure in Yii2 my current URL is given below

```
http://localhost/advanced/posts/view?id=1

```

My expected URL is

```
http://localhost/advanced/posts/view/id/1

```

I have follow the following link to change default URL of Yii2

[Yii2 htaccess - How to hide frontend/web and backend/web COMPLETELY](https://stackoverflow.com/questions/28118691/yii2-htaccess-how-to-hide-frontend-web-and-backend-web-completely)