.htaccess inheritance?

  • I was just wondering, what happens if I have a .htaccess file in the /htdocs folder, and then another one in the /htdocs/admin folder.
    The one in /htdocs only has this thing to redirect 404 messages, and the one in /htdocs/admin[/color] has access restriction with its own .htpasswd file.

    Now, what happens if a 404 occurs under the /htdocs/admin folder?
    Will it do what the /htdocs .htaccess file says, or will it just show you the regular 404 page?

    I didn't test this yet, I'm just wondering what will happen.
    Basically my question is, if there is a .htaccess file in a child folder, and it doesn't have a setting that the father's .htaccess file has, will it use the father's setting?

    Thanks. :)


  • http://apache-server.com/tutorials/ATusing-htaccess.html


    So What's an .htaccess File?
    An .htaccess file is simply a text file containing Apache directives. Those directives apply to the documents in the directory where the .htaccess file is located, and to all subdirectories under it as well. Other .htaccess files in subdirectories may change or nullify the effects of those in parent directories; see the section on merging (http://apache-server.com/tutorials/ATusing-htaccess.html#merging) for more information.


  • Couldn't ask for more. :)
    Thanks a lot eva. :)


  • Originally posted by FireFly
    Couldn't ask for more. :)
    Thanks a lot eva. :) no probs ... learnt something new as well from it :D







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about .htaccess inheritance? , Please add it free.

    Google Adsense Profits Mixed In With Affiliate Marketing - Google Adsense Kids Eating Healthy