# IIS Rewrite URL - basepath

When you write a rewrite URL, and there is a subfolder, you will end up that the target application might not know how to manage the relative paths.

1\) Write in the App.razor some code to receive the BasePath

[![image.png](https://wiki.sophior.com/uploads/images/gallery/2024-12/scaled-1680-/wNCimage.png)](https://wiki.sophior.com/uploads/images/gallery/2024-12/wNCimage.png)

2\) In the rewrite rule append the basepath

[![image.png](https://wiki.sophior.com/uploads/images/gallery/2024-12/scaled-1680-/image.png)](https://wiki.sophior.com/uploads/images/gallery/2024-12/image.png)