HomeHomeUsing DotNetNuk...Using DotNetNuk...Administration ...Administration ...Custom 404 error page - redirecting pagesCustom 404 error page - redirecting pages
Previous
 
Next
New Post
4/25/2008 9:07 PM
 

Hi;

I had a portal which i developed from scratch and it stayed online for a while.
Now, i'm using DNN (which is working great) on the same domain.

The issue is:
A lot of web sites out there has links to artciles and other stuff on our portal, and of course, differents search engines as well.

When somebody find let's say an image gallery on our portal using Google they get:
http://www.ourdomain.com/gallery
But now that we are using DNN, the new URL is:
http://www.ourdomain.com/Gallery/tabid/92/Default.aspx

So, when the user click on that old url he will get that ugly ASP.NET error page:

Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource ...

So, my question here is how can i fix that?
Is that i way to auto redirect all broken links to the home page or setup a (nice) custom page (for each portal) telling the user to go to the Home Page?
(Just remembering, i'm not talking about Google or search engines out there but a lot of other web sites where people add links manually.)

Hope somebody can help me with that.
Thanks in advance.

 
New Post
4/26/2008 9:49 AM
 

The ideal soution from an SEO standpoint is to implement 301 redirects from your old URLs such as http://www.ourdomain.com/gallery to http://www.ourdomain.com/Gallery/tabid/92/Default.aspx. Depending on how much conrol you have over your hosting environment (IIS), there are various was to accomplish this. See this blog post for more details:

Search Engine Friendly 301 Redirects Without Touching IIS


Tom Kraak
SEO Analyst
R2integrated
 
New Post
4/26/2008 10:55 AM
 

First of all, thanks a lot. It will do the trick.
But what about the 404 error page? Is there a place on DNN where i can set it up without changing the web.config?
Because i believe too many changes on scripts will make upgrades more dificult.

 
New Post
4/26/2008 12:43 PM
 

Hi Codemaster,

In IIS, you can configure a specific 404 error target.  Look under your website -> Properties -> Custom Errors tab.  I do not believe this has changed for IIS7, but someone may correct me here.

If you are willing to make a small change to your web.config, you can also add a custom 404 target under the system.web\compilation\customErrors element.  New element would look something like <error statusCode="404" redirect="~/404.aspx"/>.  This is reasonably upgrade-friendly, but you will have to make a small change in IIS to ensure that ALL requests are redirected properly (see http://blogs.msdn.com/rahulso/archive/2007/05/18/customerrors-defaultredirect-is-not-redirecting-in-asp-net.aspx).  Without this change, IIS will not hand off all requests to ASP.NET, and ASP.NET will therefore not have the opportunity to implement the desired 404 handling.

Hope this gets you started!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
4/26/2008 6:33 PM
 

Got it all. Thanks a lot guys!!!

 
Previous
 
Next
HomeHomeUsing DotNetNuk...Using DotNetNuk...Administration ...Administration ...Custom 404 error page - redirecting pagesCustom 404 error page - redirecting pages


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Try An Online Demo
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.