redirect an old URL using web.config
- by Dog
i'm still very new to using URL rewrites and redirects and i'm having some problems on something i thought was quite simple...
i've just rebuilt a website and want to redirect the old URLs to the new ones...
for example :
http://www.mydomain.com/about.asp?lang=1
should now be
http://www.mydomain.com/content.asp?id=100230&title=about&langid=1
unfortunately, everything i've tried is giving me errors or simply does nothing.
here is one rule i tried :
<rule name="redirectoldabout" enabled="true" stopProcessing="true">
<match url="( .*)" negate="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^mydomain\.com/about\.asp\?lang=1$" />
</conditions>
<action type="Redirect" url="http://www.mydomain.com/content.asp?id=100230&title=about&langid=1" redirectType="Permanent" />
but i get an error back :
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
any suggestions as to what i'm doing wrong?
thanks
dog