Setting up a custom 404 page
Wednesday, 28 June 2006

I realised today that I didn't have a proper 404 page and some of my links have changed recently. It is also quite astounding what crap the search engines can sometimes index. One wonders what the use is of submitting a sitemap to Google if it just stubbornly refuses to GET RID of a link like

Email benefits Web Statistics Tailormade4you Website Design ...

Full control over your email accounts - have as many as you need with our webhosting packages.
www.tm4y.co.za/hosting-features/email-benefits.html - 14k - Supplemental Result -

I had moved all my hosting related pages to our new site dealing specifically with Hosting (http://www.internet-web-hosting.co.za) and deleted the hosting related pages from this website. But no, Google, in its wisdom, KNOWS WHAT'S BEST. 

Supplemental Results - the bane of my life.

So I decided to set up a proper 404 page. I saw in some research that it is probably a good idea to make your 404 page a search page. Now that's a cool idea!

So I set it up as follows:

  1. I created a Static Content page called 'search the site'.
  2. Then I inserted the search module inside the Joomla content. This is how you can do it: 

    Use either MosModule or Modulebot2. I used to use Modulebot2 previously and it still works, so I just kept on using it. You need to install it and rember to activate it in your Mambots section.

    Create a test page to see how to use the parameters.

    If you insert  { modulebot2 list }  (take out the spaces between the text and the brackets!) in your content, you will see the following on the front end:

    Modulebot2 Usage:
    { modulebot2 module=module name }
    { modulebot2 position } - position = a block position (user1, top, left, etc)
    { modulebot2 list } - display a list of modules and block positions

    Available Modules  Available Positions
    Archive   banner
    Banners  bottom
    Latest News  inset
    Random Image  left
    Search  top
    Newsflash  user3
     

    This way you can see exactly what your modules are called. Now if you want to include the search module you would include { modulebot2 module=search } in your content. 
     

  3. I linked the Static content to a Menu Item called 'Search the site'. Then I went into my OpenSEF Configuration. In the SEF TAB there is a setting where you can set the 404 page - I set this directly to http://www.tm4y.co.za/search-the-site.html. The OpenSEF component itself created the Search Engine Friendly URL based on the menu item that I created for the Static page.

 

Trackback(0)
Comments (2)Add Comment
take care: opensef/nusef bug with 301 instead 404
written by alphorg, January 15, 2008
opensef/nusef has a known bug with custom 404-pages.
it sends back NO 404-header, only a 301 redirect to your custom page.

you can veryfy this at the website here.

so if you use google webmaster tools (or something similar), which check correct server-responses on a regular basis, you will not be able to switch on this opensef-feature.
take care :-( !
Thanks
written by Nordge, August 18, 2006
Hi, this helped me in my webpage www.nordge.com

Write comment

security code
Write the displayed characters


busy
 

Latest Web Trends Blog Entries