I search a lot for this on the internet but I don't find any article related to it.

Like I have a folder called pages in the root of my project and below tree is files of it.

```
|   404.js
|   auth.js
|   index.js
|   _app.js
|   _error.js
\---app
        index.js

```

next.js gives default behavior when someone opens `project.local:3000` it will open`index.js` and `project.local:3000/app` it will open `app/index.js` but I want that when someone open `app.project.local:3000` it will open `app/index.js`.

**My Hosts file** 

```
127.0.0.1 project.local
127.0.0.1 app.project.local

```

**In short**

I want to redirect `pages/app` folder to `app.project.local` or `app.example.com` in next.js