I do not want to redirect any malicious link or user to redirect to other domain. Instead it should redirect to the domain which I mentioned. So for that, I have written below Rewrite URL rule by using IIS server
<rewrite>
<rules>
<clear />
<rule name="Redirect to https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="off" />
<add input="{HTTP_HOST}" matchType="Pattern" pattern="^([a-zA-Z0-9-_]+.)https://nvmbd1bkh150v02.rjil.ril.com$" ignoreCase="true" negate="true" />
</conditions>
<action type="Redirect" url="https://nvmbd1bkh150v02.rjil.ril.com/FiberInventoryPortal" redirectType="Permanent" appendQueryString="false" />
</rule>
</rules>
</rewrite>
But what happening here is, all my application CSS gets disturbed. Please suggest what should I do in this case.
Not sure what you mean with "malicious" links but my guess is that you want visitors to use just that specific host name. And also that every URL should always start with
/FiberInventoryPortal/
.So possibly this is what you want:
According to your url rewrite codes, I found you will redirect all the request to the
https://nvmbd1bkh150v02.rjil.ril.com/FiberInventoryPortal
include the CSS file. This is the reason why your CSS file not working.If your css file is also in the new site's FiberInventoryPortal folder. I suggest you could try below url rewrite rule.