IIS Rewrite URL for...
 
Notifications
Clear all

IIS Rewrite URL for Default Web SIte  

  RSS

DDC
 DDC
Eminent Member
Joined: 5 years ago
Posts: 20
2020-07-25 21:34  

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.


Quote
Jacob Dixon
Noble Member Admin
Joined: 6 years ago
Posts: 1098
2020-07-27 08:31  

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


ReplyQuote
Share: