# Alias or Media uri rewrite for .stream files

**URL:** https://community.wowza.com/t/alias-or-media-uri-rewrite-for-stream-files/39683
**Category:** Wowza Streaming Engine
**Created:** [June 22, 2014, 6:47am UTC](https://community.wowza.com/t/alias-or-media-uri-rewrite-for-stream-files/39683 "2014-06-22T06:47:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_Shmayev](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@Sam\_Shmayev](https://community.wowza.com/u/Sam_Shmayev)
#### Post date: [June 22, 2014, 6:47am UTC](https://community.wowza.com/t/alias-or-media-uri-rewrite-for-stream-files/39683/1 "2014-06-22T06:47:01Z")

</div>

Hi,

I use .stream files with json content.

How to alias/rewrite request uri?

> Use this interface instead of the StreamNameAlias AddOn or .stream files when you need programmatic control of aliasing.

IMediaStreamNameAliasProvider2 is incompatible with .stream files.

Any ideas appreciated.

---

<div class="post-metadata">

### Author: ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)
#### Post date: [June 23, 2014, 10:28am UTC](https://community.wowza.com/t/alias-or-media-uri-rewrite-for-stream-files/39683/2 "2014-06-23T10:28:53Z")

</div>

Hi,

When you implement the **IMediaStreamNameAliasProvider2** interface, your class replaces the .stream files as both use the interface and there can be only one alias provider assigned. You have a couple of options, depending on your workflow.

- Call the .stream file handler from your own resolveStreamAlias methods. This will pull the JSON output into the methods and then you can return that directly or perform extra processing on it before returning.

- Create & return JSON from your resolveStreamAlias methods.

---

<div class="post-metadata">

### Author: ![Sam\_Shmayev](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@Sam\_Shmayev](https://community.wowza.com/u/Sam_Shmayev)
#### Post date: [June 23, 2014, 10:22am UTC](https://community.wowza.com/t/alias-or-media-uri-rewrite-for-stream-files/39683/3 "2014-06-23T10:22:08Z")

</div>

Thanks, great!
