iis url rewrite

PENG LI 1 Reputation point
2022-04-04T07:09:38.713+00:00

I need to rewrite:

wss://localhost:443/mqtt => ws://localhost:8083/mqtt

Tried many methods are invalid!

Help, thank you!

Internet Information Services
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sam Wu-MSFT 6,611 Reputation points Microsoft Vendor
    2022-04-05T02:06:29.03+00:00

    @PENG LI

    wss://localhost:443/mqtt => ws://localhost:8083/mqtt

    Do you want to rewrite port 443 to port 8083 through url rewriting? if so, you can try below rule:

    <rule name="Farm" enabled="true" patternSyntax="Wildcard" stopProcessing="true">  
         <match url="(.*)" ignoreCase="true" />  
        <action type="Rewrite" url="localhost:8083/{R:0}" />  
     </rule>  
    

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments