1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do i easily secure subfolders with htaccess

Discussion in 'Web Hosting' started by Panther28, Feb 2, 2013.

  1. Panther28

    Panther28 Elite Member

    Joined:
    May 2, 2010
    Messages:
    2,268
    Likes Received:
    3,405
    Occupation:
    Internet.
    Location:
    Internet.
    I have a hosting package setup on hostgator
    .mywebsite.com

    and i have addon domains on the host too
    .mywebsite.com/differentwebsite.com

    How to i allow visitors to still access differentwebsite.com, but block anyone & also robots from getting to the site via .mywebsite.com/differentwebsite.com

    is there anything else i should be aware off?
     
  2. Panther28

    Panther28 Elite Member

    Joined:
    May 2, 2010
    Messages:
    2,268
    Likes Received:
    3,405
    Occupation:
    Internet.
    Location:
    Internet.
    Ok i've figured it out that i can check the url with my index.php in the subdomain.com and redirect the url to that,

    and also in the mywebsite.com i can put a line of code in the robots.txt that will block spiders from going into the subdomain, but what i'm not sure about is how this will then affect subdomain.com? will spiders be blocked from that too, or is that upto the subdomain robot.txt ?