website with WP blog in subfolder - where should I place .htaccess for a blog

Discussion in 'Web Hosting' started by bilby, Feb 28, 2015.

  1. #1
    I have a site with few static pages and a blog. The blog is WordPress based and it is installed in subfolder. After using caching plugin I discovered .htaccess file in blog subfolder - it is full with caching related instructions. I already have an .htaccess file in the HTML root, this one has some redirects, blocking spam bots, cache expiration instructions, etc.

    Now I am confused whether I should merge these 2 .htaccess files into one and place it in HTML root... Basically my question is:
    If I have .htaccess file in the HTML root, will .htaccess file in the blog folder ever be used/loaded? In other words, I am afraid that everything that caching plugin updated in .htaccess file to enable cache will never be read, and as a result, the caching will not work.

    Please help to clarify this.
     
    bilby, Feb 28, 2015 IP
  2. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #2
    The .htaccess file in the blog folder will be used every time your blog page is viewed by a human or bot.

    Leave it alone. Do not merge them.
     
    billzo, Feb 28, 2015 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    An .htaccess file in a subfolder overrides a root-folder .htaccess - if there's no overlapping instructions, they'll behave in tandem (unless your host has some very weird settings)
     
    PoPSiCLe, Feb 28, 2015 IP