0

How to redirect asp page (http://www.example.com/page.asp?id=11) to another domain (http://www.anothersite.com) using web.config file. I used below code but not working.

<configuration><location path="http://www.example.com/page.asp?id=11"><system.webServer><httpRedirect enabled="true" destination="http://www.anothersite.com" httpResponseStatus="Permanent" /></system.webServer></location></configuration>

Thanks.

sameeuor
  • 664
  • 7
  • 17

1 Answers1

2

You're probably better doing this using URLRewrite or adding some suitable logic to Custom Error page handling.

Have a look at the answers to this question Configuring custom ASP 404 page with redirect for IIS7 website

Community
  • 1
  • 1
Andy Davies
  • 1,456
  • 9
  • 13