[opencms-dev] Custom 404 pages on a per-site basis...

Martin Rioux martin.rioux at crim.ca
Mon Jul 3 16:32:11 CEST 2006


Hi

I have a multi-site configuration. I change the /system/handler/handle404.html file. I add

<%response.sendRedirect("/error404.html");%>.

I use opencms 6.2.1 and the config to get rid of the /opencms/opencms-prefix (see HowTo: Get rid of the /opencms/opencms-prefix (without installing OpenCms as ROOT-Webapp, http://opencms-forum.de/viewtopic.php?t=713).

Martin


  ----- Original Message ----- 
  From: Corsin Camichel 
  To: The OpenCms mailing list 
  Sent: Monday, July 03, 2006 5:12 AM
  Subject: Re: [opencms-dev] Custom 404 pages on a per-site basis...


  Hello Nigel

  All you can do (as what I have found out) is create 1 404 page in /JAKARTA/webapps/ROOT/ and inside the 404 page a switch between the different sites.
  If you come up with any other solution, I would love to hear that from you. 

  Code:
  String serverHost = request.getServerName();
              
  if(serverHost.equals("HOST1")) {    // like www.unsw.edu.au
      // code 1
  } else if (serverHost.equals ("HOST2")) {    // like cofa.unsw.edu.au
      // code 2
  } ...

  Best wisches and regards
  Corsin Camichel


  On 7/3/06, Nigel Kersten <nigel at cofa.unsw.edu.au> wrote:
    I'm wondering how we can actually define our 404 pages to be within
    the site itself? or at least on a per-site basis, rather than having
    one global 404 page for the entire OpenCMS server.

    Does anyone know if this is possible without writing conditional code 
    within the same page?

    --
    Nigel Kersten [Senior Technical Officer]
    College of Fine Arts, University of NSW, Australia.
    CRICOS Provider Code: 00098G




    _______________________________________________ 
    This mail is sent to you from the opencms-dev mailing list
    To change your list options, or to unsubscribe from the list, please visit
    http://lists.opencms.org/mailman/listinfo/opencms-dev 




  -- 
  Corsin Camichel
  cocaman at gmail.com 


------------------------------------------------------------------------------



  _______________________________________________
  This mail is sent to you from the opencms-dev mailing list
  To change your list options, or to unsubscribe from the list, please visit
  http://lists.opencms.org/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060703/9e85ef23/attachment.htm>


More information about the opencms-dev mailing list