webressurs
asked on
URL Rewrite / mapping in asp.net
I use the URL rewrite module in web.config to make canonical URL. That works perfect.
Now I want to make some easy "shortcut" urls that is mapped to the original long url.
Example:
If user writes http://www.example.com/contact/ that url should point to this spesific url (not redirected if possible): http://www.example.com/templates/sections/common/module.aspx?id=5790
I tried this, but no luck:
How do I make (static) friendly URLs like I try to do here?
Now I want to make some easy "shortcut" urls that is mapped to the original long url.
Example:
If user writes http://www.example.com/contact/ that url should point to this spesific url (not redirected if possible): http://www.example.com/templates/sections/common/module.aspx?id=5790
I tried this, but no luck:
<rewrite>
<rewriteMaps>
<rewriteMap name="Redirects">
<add key="/contact/" value="/templates/sctions/common/Module.aspx?id=5790" />
</rewriteMap>
</rewriteMaps>
<rules>
<rule name="CanonicalHostName" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.nettdating\.no$" negate="true" />
</conditions>
<action type="Redirect" url="http://www.nettdating.no/{R:1}" />
</rule>
</rules>
</rewrite>
How do I make (static) friendly URLs like I try to do here?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER