1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Redirect EVERYONE except certain IP to comingsoon.html

Discussion in 'Apache' started by DaVe™, Aug 14, 2007.

  1. #1
    As the topic says, i need to redirect everyone except a certain ip address (mines) to another page (comingsoon.html)

    I seen a post somewhere about this before using the .htaccess file and some sort of deny from all

    Anyone know how to do this?


    Thanks
     
    DaVe™, Aug 14, 2007 IP
  2. bilal@revolutionhosting

    bilal@revolutionhosting Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In your .htaccess file, you would want something similar to:

    
    ErrorDocument 403 /comingsoon.html
    
    <Limit GET POST PUT>
         Order deny,allow
         Deny from all
         Allow from 1.2.3.4
    </Limit>
    
    Code (markup):
    Where 1.2.3.4 is the IP address you'd like to allow requests from (in this case, your own).

    Note that this applies to both the directory you have placed this .htaccess in, as well as all subdirectories of it.
     
    bilal@revolutionhosting, Aug 17, 2007 IP