Quick redirect

Discussion in 'Install/Configuration' started by alex, Jun 16, 2009.

  1. alex

    alex Well-Known Member

    Is there an easy way to do a quick redirect of the entire site to a web page, for maintanence for example or do I have to play with the .htaccess file
    on each server?
  2. mistwang

    mistwang LiteSpeed Staff

    How the web site being configured? through httpd.conf? or natively via LSWS console?
  3. alex

    alex Well-Known Member

    through the LSWS console
  4. mistwang

    mistwang LiteSpeed Staff

    There are a few options.
    first, create a vhost show only the maintanence page.

    then, you can either update the listener->vhost mapping to show the maintanence vhost.

    or add a redirect context to direct to the dedicate maintanence page. you need to assign a sub-domain for that vhost.
  5. alex

    alex Well-Known Member

    I have tried the first method, the problem is it only works for the index page, if someone has an existing link or comes from a google search they get an error

    Can you explain more on the second method?
  6. auser

    auser Super Moderator

    there is a simple way to do this, FYI:

    assume your document root /public_html
    rename to /public_html.bak

    recreate /public_html

    put only maintain.html under the new root. and configure the 404 error page pointing to it.
  7. mistwang

    mistwang LiteSpeed Staff

    You can add a matching context to match everything to that page.

Share This Page