Restrict access based on IP to a subdomain

Discussion in 'General' started by ataman79, Nov 26, 2008.

  1. ataman79

    ataman79 New Member

    Hi,
    I want to ask you how can I do that:

    I have a domain, for example : mydomain.com
    Than I created a subdomain: new.mydomain.com
    and I want to deny all access from the internet to this subdomain new.mydomain.com, and also to allow access to it for a specific IP addresses ?

    I read that I can do this with "order deny, allow....." but where I can wrote all this ?

    Can anyone help me ?
     
  2. ataman79

    ataman79 New Member

    Ok I solved the problem by my own, if somebody is interested here it is:

    I just make an .htaccess file and in it I use:
    Deny from all
    Allow from ........ (ip addresses I want)

    And now it's work :)

    If this is not right , please let me now :)
     

Share This Page