You can try this solution:
Please back up your applicationHost.config file first.
- In IIS server, check if this file exists:
%SystemRoot%\system32\inetsrv\rewrite.dll
. If the file exists, continue the steps below. If it doesn’t, search for the file in server. If it doesn’t exist, it means URL Rewrite is not installed. It should be installed first - Open
applicationHost.config
file - Add this line into the
<globalModules>
section:<add name="RewriteModule" image="%SystemRoot%\system32\inetsrv\rewrite.dll" />
- Add the lines below in the <configSections> section: <sectionGroup name="rewrite">
<section name="globalRules" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
<section name="rules" overrideModeDefault="Allow" />
<section name="outboundRules" overrideModeDefault="Allow" />
<section name="providers" overrideModeDefault="Allow" />
<section name="rewriteMaps" overrideModeDefault="Allow" />
<section name="allowedServerVariables" overrideModeDefault="Deny" />
</sectionGroup> - Add your URL Rewrite rule in the <system.webServer> section. Example: <rewrite>
<globalRules>
<rule name="Remove authToken parameter from Query String" enabled="true" stopProcessing="true">
…
</rule>
</globalRules>
</rewrite> - Save the file
- Reset IIS
For more information, please refer to the document: 873174
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.