sdelements / lets-chat

Self-hosted chat app for small teams
http://sdelements.github.io/lets-chat
MIT License
9.76k stars 1.58k forks source link

IIS Rewrite #777

Open Diskovered opened 6 years ago

Diskovered commented 6 years ago

I have lets-chat hosted on iis under virtual folder /chat

I created the following rewrite for it, but it's not working quite right. I'm curious if anyone out there have experience with this and whether or not it's possible to host this in IIS?

 <rule name="rewrite to 5000 port" enabled="false">
                    <match url="(.*)" />
                    <conditions trackAllCaptures="true">
                        <add input="{HTTP_HOST}" pattern="localhost" />
                        <add input="{SERVER_PORT}" pattern="80" />
                        <add input="{URL}" pattern="^/chat" />
                    </conditions>
                    <action type="Rewrite" url="http://localhost:5000/login" />
                </rule>
tracker1 commented 6 years ago

You should be able to do this, however, does the lets-chat app run from the /login url always? it seems you should append the captured path for matching to the action... Sorry, it's been a few years since I've really had to use IIS regularly.