iis 7 relative redirect with get parameters
I have a http redirect in iis7 to send request to another domain. If url is something like http://www.example.com/news/
it's ok but if i try http://www.example.com/news/?id=3
then get parametes is deleted from string it's redirects to the same http://www.example.com/news/
.
How to save get parameters in query string with iis7?
web.config:
<?xml version="1.0" encoding="UTF-8"?&g开发者_StackOverflow社区t;
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="http://www.example.com" exactDestination="false" httpResponseStatus="Permanent" />
</system.webServer>
</configuration>
I believe you simply need to add '$S$Q' to the end of your redirect URL, e.g. destination="http://www.example.com$S$Q".
See also related StackOverflow question: How to redirect a URL path in IIS?
精彩评论