<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx</link><description>People alway ask how to use their own 404 file not found error page vs. the generic one from IE in MOSS environment. The following example catches the 404 error and sends users to a redirect page. Here's the steps: 1. In your MOSS server, make a copy</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Links (4/8/2007) &amp;laquo; Steve Pietrek&amp;#8217;s SharePoint Weblog</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#2056624</link><pubDate>Mon, 09 Apr 2007 03:41:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2056624</guid><dc:creator>Links (4/8/2007) « Steve Pietrek’s SharePoint Weblog</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://stevepietrekweblog.wordpress.com/2007/04/08/links-482007/"&gt;http://stevepietrekweblog.wordpress.com/2007/04/08/links-482007/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#2057930</link><pubDate>Mon, 09 Apr 2007 08:09:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2057930</guid><dc:creator>imorrish</dc:creator><description>&lt;p&gt;Here are the PowerShell caommands I used instead of having to compile a console app (step 5 in Jingmei’s blog).&lt;/p&gt;
&lt;p&gt;PS C:\&amp;gt; [System.Reflection.Assembly]::Load(&amp;quot;Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;)&lt;/p&gt;
&lt;p&gt;PS C:\&amp;gt; $webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(&amp;quot;&lt;a rel="nofollow" target="_new" href="http://www.wssdemo.com&amp;quot;"&gt;http://www.wssdemo.com&amp;quot;&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;PS C:\&amp;gt; $webapp.FileNotFoundPage = &amp;quot;wssdemo404.html&amp;quot;&lt;/p&gt;
&lt;p&gt;PS C:\&amp;gt; $webapp.Update()&lt;/p&gt;
&lt;p&gt;Demo &lt;a rel="nofollow" target="_new" href="http://www.wssdemo.com/pages/deletedpage.aspx"&gt;http://www.wssdemo.com/pages/deletedpage.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>MOSS Custom Error Page</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#2076721</link><pubDate>Tue, 10 Apr 2007 22:54:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2076721</guid><dc:creator>Meron Fridman's Blog</dc:creator><description>&lt;p&gt;Jingmei Li provides nice solution how to create your own custom 404 error page and handle redirect in&lt;/p&gt;
</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#2109139</link><pubDate>Fri, 13 Apr 2007 07:53:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2109139</guid><dc:creator>joelo</dc:creator><description>&lt;p&gt;There are other tricks to forcing yout custom 404 to show up. &amp;nbsp;The logic is that the 404 needs enough text to be considered a good 404 page by IE. &amp;nbsp;Add more text to your 404 and it will come up.&lt;/p&gt;
</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#2552593</link><pubDate>Fri, 11 May 2007 23:35:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2552593</guid><dc:creator>bernadou</dc:creator><description>&lt;p&gt;Very nice article. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I'm curious why one can't use a .aspx file? &amp;nbsp;The HTML file contains JS which can easily be turned off, and, so can META refreshes.&lt;/p&gt;
&lt;p&gt;Like:&lt;/p&gt;
&lt;p&gt;webApplication.FileNotFoundPage = &amp;quot;my404.aspx&amp;quot;;&lt;/p&gt;
&lt;p&gt;Assuming the file is in the /_layouts VD?&lt;/p&gt;
&lt;p&gt;Seems like it 'should' work, but, it doesn't as you pointed out.&lt;/p&gt;
</description></item><item><title>Creating custom 404 and landing pages (easy to remember URLs that are redirected) in SharePoint</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#3832160</link><pubDate>Thu, 12 Jul 2007 17:03:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3832160</guid><dc:creator>Michael Hofer - SharePoint Blog</dc:creator><description>&lt;p&gt;This post is about how to create custom landing pages ( www.mysite.com/products or www.mysite.com/newsletter&lt;/p&gt;
</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#4048226</link><pubDate>Wed, 25 Jul 2007 22:03:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4048226</guid><dc:creator>JamCo</dc:creator><description>&lt;p&gt;imorrish: &amp;nbsp;Thank you! &amp;nbsp;I don't have an extra server license and studio license just sitting around for sharepoint so there is no way to compile a console app. &amp;nbsp;PowerShell worked awesome!&lt;/p&gt;
&lt;p&gt;I wonder though, why not make an ASPX script that references the assembly and makes the required call to SPWebApplication? &amp;nbsp;That way you need not compile a console application or install PowerShell.&lt;/p&gt;
</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#6695433</link><pubDate>Fri, 07 Dec 2007 20:41:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6695433</guid><dc:creator>lenc</dc:creator><description>&lt;p&gt;Does this work for content not found in the _layouts directory? &amp;nbsp;For pages not found in _layouts, we either get a sharepoint page saying &amp;quot;Error&amp;quot; and a link to &amp;quot;TroubleShoot issues with SharePoint Services&amp;quot;. &amp;nbsp;We don't want to show that - it's an internet facing custom Portal.&lt;/p&gt;</description></item><item><title>Using PowerShell to set a custom SharePoint Error Page</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#6833894</link><pubDate>Sat, 22 Dec 2007 11:10:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6833894</guid><dc:creator>Mirrored Blogs</dc:creator><description>&lt;p&gt;Body: You can define a custom error page for SharePoint (see ... Category: SharePoint Published: 9/04&lt;/p&gt;</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#6886946</link><pubDate>Fri, 28 Dec 2007 20:41:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6886946</guid><dc:creator>RobRoach</dc:creator><description>&lt;p&gt;In my testing it appears that the webApplication.FileNotFoundPage is set when the web apps top level site is a team site, but is not set (or turned off by publishing?) when the top level site is a publishing site. &amp;nbsp;Can anyone confirm that this is correct or just my local machine issue? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Preventing and Managing Broken Links in SharePoint</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#9011640</link><pubDate>Wed, 22 Oct 2008 23:22:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9011640</guid><dc:creator>Brett's SharePoint Blog</dc:creator><description>&lt;p&gt;Link Integrity Management: Processes, Tactics, and Solutions One lengthy and complex topic I recently&lt;/p&gt;
</description></item><item><title>Does not work, which is really weird</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#9022195</link><pubDate>Wed, 29 Oct 2008 16:10:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9022195</guid><dc:creator>AllTheGoodNamesAreInUse</dc:creator><description>&lt;p&gt;So, I copied the original file to a new one.&lt;/p&gt;
&lt;p&gt;Calle NEW404.html, in the same layouts \1033 as the sps404.html.&lt;/p&gt;
&lt;p&gt;Then I just changed the redirect to point to _layouts/myredirect/myredirectp.asx?oldurl=....&lt;/p&gt;
&lt;p&gt;Then I used powershell to set the value as per the post above.&lt;/p&gt;
&lt;p&gt;Then when I try a nonexistent url, I get a popup window in IE stating &amp;quot;Invalid page url&amp;quot;.&lt;/p&gt;
&lt;p&gt;If I use the same powershell to do $webapp.FileNotFoundPage=&amp;quot;sps404.html&amp;quot; and then run $webapp.Update(), it works just fine.&lt;/p&gt;
&lt;p&gt;So, if I place my custom code in the sps404 file it work like a charm. &lt;/p&gt;
&lt;p&gt;And if I place the same code in my own file, it does not work.&lt;/p&gt;
&lt;p&gt;Does anyone have any ideas where to look for the issue here?&lt;/p&gt;
&lt;p&gt;I did check the logs and they just show that I have requested a nonexistent url, and in the error case it goes to the moss site frontpage and shows all normal 200 resultant stuff.&lt;/p&gt;
&lt;p&gt;And in the working case I see a 302, and it shows my browser has requested the correct myredirect.aspx stuff.&lt;/p&gt;
&lt;p&gt;Darn. &lt;/p&gt;
</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#9691204</link><pubDate>Wed, 03 Jun 2009 16:25:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9691204</guid><dc:creator>Gangadhar Kotu</dc:creator><description>&lt;p&gt;Good post and very much useful&lt;/p&gt;
</description></item><item><title>Creating custom 404 and landing pages (easy to remember URLs that are redirected) in SharePoint</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#9709837</link><pubDate>Tue, 09 Jun 2009 01:04:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9709837</guid><dc:creator>Sourav Dutta's SharePoint - All Rounder</dc:creator><description>&lt;p&gt;This post is about how to create custom landing pages ( www.mysite.com/products or www.mysite.com/newsletter&lt;/p&gt;
</description></item><item><title>re: How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?</title><link>http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx#9856381</link><pubDate>Mon, 03 Aug 2009 20:34:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9856381</guid><dc:creator>nauman_ahmed</dc:creator><description>&lt;p&gt;An easier approach for a MOSS Internet web site would be:&lt;/p&gt;
&lt;p&gt;1. Create a new error page using any page layout say WebError.aspx (&lt;a rel="nofollow" target="_new" href="http://www.yourapplication/Pages/WebError.aspx"&gt;http://www.yourapplication/Pages/WebError.aspx&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;2. Modify web.config and set the error redirect page URL to the above Page.&lt;/p&gt;
&lt;p&gt;3. Add code to Application_Error event in global.asax for additional error handling.&lt;/p&gt;
&lt;p&gt;--Nauman.&lt;/p&gt;
</description></item></channel></rss>