redirect all to one page

Discussion in 'Apache' started by Seph, May 7, 2007.

  1. #1
    I'm in the process of moving servers, so while the DNS is updated throughout the world I'd like all visitors still getting the old IP to be redirected to an index.html page no matter where they visit.

    So I need something like if page is not index.html then redirect to index.html.

    Thanks in advance.
     
    Seph, May 7, 2007 IP
  2. Juan Pablo Olivera

    Juan Pablo Olivera Peon

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would say place that index.html under /usr/local/apache/htdocs on the old server and setup an .htaccess on your sites with something like this:

    RewriteEngine on
    RewriteRule ^/~(.+) http://<server_ip_or_hostname>/index.html [R,L]
     
    Juan Pablo Olivera, May 8, 2007 IP