eg,my iis folder directory structure like:
IIS
|-default app (80 port)
|- Aapp
|- Bapp
|- Capp
I can set all 80 port app have internet premission,but i have trouble when I'd like to set Aapp only intranet
premission and other app Bapp,Capp have internet
premission.
expected:
internet
link https://mycompany.com/Aapp
get 404
status code intranet
link https://192.168.1.1/Aapp
get 200
status code internet
link https://mycompany.com/Bapp
get 200
status code If your intranet IP segement looks like 192.168.xx Then you could set the rule like this to exclude intranet IP address. In this case, all IP doesn't match your intranet net will be blocked by Aapp.
<rule name="rewrite rule1" stopProcessing="true">
<match url="Aapp" />
<conditions>
<add input="{REMOTE_ADDR}" pattern="192\.168\.[0-9]+\.[0-9]+" negate="true" />
</conditions>
<action type="CustomResponse" statusCode="404" subStatusCode="0" statusReason="Internet access not allowed" statusDescription="Not found" />
</rule>
If 404 response is not necessarily.Then you can set domain and IP restriction rule for each application.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.