So I would like to capture the URL in some CS file before getting 404 file or automatic redirect, do all rewrite all by myself and do the redirect my way.
I any reason why you can't use the built in UrlRewriter functionality that comes with Umbraco by simply adding a new rule to the UrlRewriting.config file in the config folder of umbraco to do what you are looking for? Say:
That would seem like best practice to me as it uses functionality alright built into Umbraco for this purpose - doing it another way would risk putting you at odds wit the existing tools.
Hijack URL Rewrite before error 404
Hi 1st Post, I'm at version 4.5
Say I had url:
http://server/home/fist.aspx
But I move the object for some organization reasons
http://server/home/new/fist.aspx
So I would like to capture the URL in some CS file before getting 404 file or automatic redirect, do all rewrite all by myself and do the redirect my way.
Any Ideas?
I any reason why you can't use the built in UrlRewriter functionality that comes with Umbraco by simply adding a new rule to the UrlRewriting.config file in the config folder of umbraco to do what you are looking for? Say:
<add name="myRewrite" virtualUrl="~/home/first.aspx"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/home/new/first.aspx"
ignoreCase="true" />
That would seem like best practice to me as it uses functionality alright built into Umbraco for this purpose - doing it another way would risk putting you at odds wit the existing tools.
the problem is that I have thousands of old URLs
so would be cool to grab and replace some strings
is working on a reply...