Hi @Jagadeesh Mohan ,
You can try the following command line:(The following example is to create a rewrite rule to "redirect to HTTPS" by using appcmd)
appcmd.exe set config "Default Web Site/mobile_vir_dir" -section:system.webServer/rewrite/rules /+"[name='Redirect to HTTPS']"
appcmd.exe set config "Default Web Site/mobile_vir_dir" -section:system.webServer/rewrite/rules /"[name='Redirect to HTTPS'].match.url:"(.*)""
appcmd.exe set config "Default Web Site/mobile_vir_dir" -section:system.webServer/rewrite/rules /+"[name='Redirect to HTTPS'].conditions.[input='{REQUEST_FILENAME}',matchType='IsFile']"
appcmd.exe set config "Default Web Site/mobile_vir_dir" -section:system.webServer/rewrite/rules /+"[name='Redirect to HTTPS'].conditions.[input='{REQUEST_FILENAME}',matchType='IsDirectory']"
appcmd.exe set config "Default Web Site/mobile_vir_dir" -section:system.webServer/rewrite/rules /"[name='Redirect to HTTPS'].action.type:"Rewrite"" /"[name='Redirect to HTTPS'].action.url:"client/index.htm""
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.
Best regards,
Yurong Dai