I'm in a situation where the client want's to set up 301 redirects on their new site. This s easily done with the great 301 URL tracker package, but I simply can't get it to work the way I want :-(
Thing is, the client have 1600+ urls from their old site that they want to set up 301 redirects for on their new site. Since their old site was a Joomla site, the old URLs are .php, .html .cfm etc etc. I've searched high and low on this since I don't want to manually add all these redirects in the UrlRewriting.config file ;-) I've found this snippet by browsing the forums:
When I select the node in Umbraco "Om os" (About us in danish) and I enter the following url: "/about.php" it redirects me to the page "/about.aspx" which doesn't exists since there's no Umbraco node with that name.
Is there a way to make it redirect to the selected node for the rule instead? That'll make my life much easier ;-)
Hmm not sure if that is possible. Might be better to write a custom piece of code for that. Can you give an example where the page should redirect to. For example you say /about.php becomes /about.aspx, but that does't exist. What is the name or id of the node which it should redirect to?
Thanks a lot for your input :-) Greatly appreciated!
I hit the nail on the head and started building my own datatype which modifies the UrlRewriting.config directly from a node (don't know if that will cause any problems?) and the ability to add more rules for the node you're editing.
Got it to write to the config now, so far so good ;-) I wonder if there's a place for a package like this, maybe? I can't be the only one who have had this need, no?
Oh by the way, I totally forgot to answer your question - sorry about that.
Let's just grab the "about us" example. If I pick the Umbraco node "Om os" in the 301 Url Tracker and enter the old url: "/about.php" with the rewrite rule I mentioned in my original post, it will try to redirect me to "/about.aspx" since it's just looking at the extension :-)
I agree that you could also just use the config tree package, but I don't want the client to be able to enter the actual XML for the config (you just never know, right? ;-))
301 redirect mappings on a node
Hi all,
I'm in a situation where the client want's to set up 301 redirects on their new site. This s easily done with the great 301 URL tracker package, but I simply can't get it to work the way I want :-(
Thing is, the client have 1600+ urls from their old site that they want to set up 301 redirects for on their new site. Since their old site was a Joomla site, the old URLs are .php, .html .cfm etc etc. I've searched high and low on this since I don't want to manually add all these redirects in the UrlRewriting.config file ;-) I've found this snippet by browsing the forums:
While this works this way:
When I select the node in Umbraco "Om os" (About us in danish) and I enter the following url: "/about.php" it redirects me to the page "/about.aspx" which doesn't exists since there's no Umbraco node with that name.
Is there a way to make it redirect to the selected node for the rule instead? That'll make my life much easier ;-)
Thanks a lot in advance.
All the best,
Bo
Hmm not sure if that is possible. Might be better to write a custom piece of code for that. Can you give an example where the page should redirect to. For example you say /about.php becomes /about.aspx, but that does't exist. What is the name or id of the node which it should redirect to?
Jeroen
Hi Jeroen,
Thanks a lot for your input :-) Greatly appreciated!
I hit the nail on the head and started building my own datatype which modifies the UrlRewriting.config directly from a node (don't know if that will cause any problems?) and the ability to add more rules for the node you're editing.
Got it to write to the config now, so far so good ;-) I wonder if there's a place for a package like this, maybe? I can't be the only one who have had this need, no?
Thanks again!
- Bo
So far I've used the Config Tree package so I can edit the redirects from Umbraco, but your package sounds like a much better solution :).
Jeroen
Oh by the way, I totally forgot to answer your question - sorry about that.
Let's just grab the "about us" example. If I pick the Umbraco node "Om os" in the 301 Url Tracker and enter the old url: "/about.php" with the rewrite rule I mentioned in my original post, it will try to redirect me to "/about.aspx" since it's just looking at the extension :-)
Dunno if that makes any sense?
I agree that you could also just use the config tree package, but I don't want the client to be able to enter the actual XML for the config (you just never know, right? ;-))
About your example I know it will try to redirect to /about.aspx, but what url should it redirect to instead?
Jeroen
It should redirect to the Umbraco node you select when creating a new 301 URL Tracker node :-) So basically you'd say:
Make a 301 redirect *from* an old url (the URLs you enter in the 301 redirected UI) to *this* node (the selected node)
It could also be that I'm totally confused about how the 301 URL tracker works, though.
Let me know if this is totally off ;-)
is working on a reply...