Last post Jan 01, 2006 05:42 AM by xfernal
Dec 30, 2005 01:38 PM|Unfolded|LINK
3.x - Anyone knows how to catch and display a nice message to URL's pointed to a deleted portal?
Some URL's might exist in searchengines, and people click on the links ending up in a page not found 404 error.
I like the to know what happen and where to go.
Dec 30, 2005 04:44 PMfirstname.lastname@example.org|LINK
Set up a child portal with aliases for the deleted portals. Create a single page that says the protal they requested has been removed, and suggest an existing portal if appropriate.
Jan 01, 2006 05:42 AM|xfernal|LINK
Instead of giving them a 404 or giving a "nice message", why not redirect them to the correct place? You have a couple of options, with #2 being the most friendly to search engines...
1. Add all links from deleted portal to your siteurls.config
This would give a 200 header response status instead of a 301 or 302). I tested this by adding the following to my siteurls.config file:
Testing it by going to http://www.domain.com/foo.aspx AND
http://www.domain.com/whatever/tabid/123456/foo.aspx both result in a 200 status (HTTP/1.1·200·OK), but delivered
http://www.domain.com/bar.html content. You may be happy with this but as a warning, search engines could treat this as redundant content and penalize your site, because to them, it is another "unique" URL with the
2. Assuming you have the ability to create a custom 404 page on your host server (which any decent host should allow you to do), create a 404.aspx page that redirects using 301 header responses
It should be fairly easy to capture the 404 url in the querystring and parse it as needed or setup a select case statement to match old URLS with new URLS. When you are in
a case, set header response like this:
Response.Status = "301 Moved Permanently";
This will "redirect" the user to the new page but also tell search engines that the old page moved to the new one. When we moved our sites from a custom ASP CMS system to DNN, we used this to direct valuable traffic from any
.asp page to redirect to the new DNN page. It was a pain in the a$$ to add all the old URLS and New URLS to the 404 page but defintely worth it to keep the same traffic flowing correctly. Plus, search engines quickly picked up on the "permanently moved page"
and updated their indexes accordingly.