Redirecting the WHOLE website to one page

Discussion in 'Programming' started by Habboubih, Oct 21, 2009.

  1. #1
    Greetings,

    Let us assume that i have a website that contains many pages and sub-domains


    http://www.xxxxxx.com

    http://www.xxxxxx.com/download.php?file=Xjf7fkfmv

    http://forums.xxxxxx.com

    http://subdomain.xxxxxx.com/index.php

    I for some reason I want to disable the whole site and redirect the visitor to one particular page:

    http://www.xxxxxx.com/under_construction.html


    How to do that?

    please not that even pages such as

    http://www.xxxxxx.com/download.php?file=Xjf7fkfmv

    needed to be redirected
     
    Habboubih, Oct 21, 2009 IP
  2. organicCyborg

    organicCyborg Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Put this in your .htaccess file.

    
    redirect 301 / http://www.yoursite.com/construction.html
    
    Code (markup):
    You'll also need to add that into the .htaccess file in the root folder of each subdomain.
     
    organicCyborg, Oct 21, 2009 IP
    DocuMaker likes this.
  3. Habboubih

    Habboubih Guest

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanx mate ....

    appreciate your help ...
     
    Habboubih, Oct 22, 2009 IP