redirect an old URL using web.config

Posted by Dog on Pro Webmasters See other posts from Pro Webmasters or by Dog
Published on 2012-11-12T11:17:41Z Indexed on 2012/11/12 11:21 UTC
Read the original article Hit count: 273

Filed under:
|

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

© Pro Webmasters or respective owner

Related posts about iis7

Related posts about Windows