IIS Rewrite URL for…
 
Notifications
Clear all

IIS Rewrite URL for Default Web SIte

2 Posts
2 Users
0 Reactions
2,181 Views
Posts: 0
Topic starter
Joined: 1 second ago

I has to re-learn this tonight after migrating to a new IIS/SQL on 2019.

For posterity

First, install IIS “URL Rewrite” from Web Installer. Then put the following in your existing (or new) web.config located at \Inetpub\wwwroot\

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="CloudPanel" stopProcessing="true">
<match url=".*" ignoreCase="true" />
<action type="Redirect" url="/CloudPanel" redirectType="Permanent" appendQueryString="false" />
<conditions>
<add input="{PATH_INFO}" pattern="^/CloudPanel" negate="true" />
</conditions>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Basically redirect anything that is not already “/CloudPanel” – intentionally left out host name so it works with localhost and whatever.

Thanks for the help tonight.

Robert

P.S. – Would still like to see the option for .TLD (.com/net/org/etc”) re-instated in company code. We used client’s full domain as Company Code as it matches up with the primary client OU and the primary UPNSuffix which we use in some other integrations/automations.

1 Reply
Posts: 1607
Admin
Noble Member
Joined: 10 years ago

Thank you for sharing! Allowing periods is now allowed in the next release coming up.

Reply
Share: