I am using "umbraco Manage URL" package to try to redirect a vanity URL. Is there any way to set it up to redirect to a vanity URL that doesn't have the full file extenstion like this?
www.yourdomain.com/vanityurlpage
Is there a way to use a wildcard to achieve this? I don't want for example www.yourdomain.com/vanityurlpage.html
Doh, re-reading that - the package doesn't seem to currently support wildcards.
Rewrite maps are for 1:1 rewrites also. Where one exact URL corresponds to another exact URL.
If you want wildcards, then your best option is to simply use a rewrite rule in your web.config, such as:
<rule name="Redirect from Old section A"> <match url="^about-us/OLD-SECTION-NAME/(.*)" /> <action type="Redirect" url="about-us/NEW-SECTION-NAME/{R:1}" redirectType="Permanent" /> </rule>
The above rule will simply rewrite any requests for pages under about-us/OLD-SECTION-NAME/ to about-us/NEW-SECTION-NAME/, preserving the rest of the URL (such as a subpage).
Redirecting a vanity URL using a wildcard?
I am using "umbraco Manage URL" package to try to redirect a vanity URL. Is there any way to set it up to redirect to a vanity URL that doesn't have the full file extenstion like this?
www.yourdomain.com/vanityurlpage
Is there a way to use a wildcard to achieve this? I don't want for example www.yourdomain.com/vanityurlpage.html
Are you trying to create a vanity URL to be used for redirection?
So if a user goes to site.com/urlhere, they get redirected to: site.com/actual/url/here/hello/world ?
Or do you simply mean that you want to turn on vanity URLs across the entire site, so that pages no longer end in .ASPX?
If its the former then it looks like the 'umbraco manage url' package should do the trick.
Maybe get in touch with the package creator, Jens?
If you don't need to give the user access to manage the redirects you can simply use a RewriteMap with your web.config, for example:
<rewriteMaps>
<rewriteMap name="StaticRewriteMap">
<add key="/urlhere/" value="/url/to/redirect/to/here" />
http://learn.iis.net/page.aspx/469/using-rewrite-maps-in-url-rewrite-module/
Cheers,
Drew
Doh, re-reading that - the package doesn't seem to currently support wildcards.
Rewrite maps are for 1:1 rewrites also. Where one exact URL corresponds to another exact URL.
If you want wildcards, then your best option is to simply use a rewrite rule in your web.config, such as:
<rule name="Redirect from Old section A">
<match url="^about-us/OLD-SECTION-NAME/(.*)" />
<action type="Redirect" url="about-us/NEW-SECTION-NAME/{R:1}" redirectType="Permanent" />
</rule>
The above rule will simply rewrite any requests for pages under about-us/OLD-SECTION-NAME/ to about-us/NEW-SECTION-NAME/, preserving the rest of the URL (such as a subpage).
Cheers,
is working on a reply...