Title: .htaccess causing problems on subdomains
Last modified: August 30, 2016

---

# .htaccess causing problems on subdomains

 *  Resolved [ssmk](https://wordpress.org/support/users/ssmk/)
 * (@ssmk)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/)
 * We have several subdomains running various applications. However, the rules added
   to the root .htaccess continually cause problems with the apps running on those
   subdomains.
 * How can I prevent the .htaccess rules added by this plugin from interfering with
   subdomains?
 * [https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779712)
 * Are you running a multisite set up? If you are what rules are you adding that
   is causing your issue?
 *  Thread Starter [ssmk](https://wordpress.org/support/users/ssmk/)
 * (@ssmk)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779714)
 * Yes, multisite using subdirectories rather than subdomains for sites.
 * Not sure which rules are to blame. There seems to be several that are added by
   AOIWPS that cause issues.
 * Usually, when an app on a subdomain isn’t working properly, the first thing I
   will do is delete all the rules added by AIOWPS from the .htaccess in the root
   directory. Very often, that fixes the issue. Then, I use a process of trial and
   error to figure out which line(s) need to be commented out.
 * Obviously, this process is onerous and I’d rather figure out a way to prevent
   the .htaccess rules from affecting subdomains at all.
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779718)
 * Can you disable all firewall rules to start with. Then check to see if your subdirectories
   work. If they work then enable one by one the firewall rules and at the same 
   time check to see if your subdirectories still work.
 *  Thread Starter [ssmk](https://wordpress.org/support/users/ssmk/)
 * (@ssmk)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779720)
 * As I said above, I’ve done that multiple times.
 * When having a problem with a subdirectory, one of the first things I do is remove
   all the lines added by AIOWPS from the .htaccess file.
 * If the problem on the subdirectory is resolved, I know that the problem was caused
   by one of the lines added by AIOWPS.
 * From there, I use the process of elimination to figure out which line is causing
   the issue and comment it out.
 * So far I’ve had to comment-out about 5-6 different lines in various sections 
   of the .htaccess file to keep the apps on my subdomains working properly. I’d
   love to tell you which lines, but I just checked the .htaccess file and see that
   my changes have been automatically overwritten.
 * Hence my original question… How do I prevent AIOWPS .htaccess rules from affecting
   subdomains?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779722)
 * Yes I did read your steps above.
 * What I was trying to explain in my instructions is rather then delete all the
   entries in the .htaccess file, is to disable the firewall rules within the plugin.
   Then enable one by one each firewall rule and testing at the same time. This 
   will allow you to pin point which option of the firewall rules is causing your
   issues. However it might be a combination of more than one option and not only
   in the Firewall rules settings.
 * I hope this helps you further.
 *  Thread Starter [ssmk](https://wordpress.org/support/users/ssmk/)
 * (@ssmk)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779724)
 * To confirm… There is *no* way to prevent AIOWPS from interfering with subdomains?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779726)
 * As far as I know, no there is no option to prevent the plugin from interfering
   with subdomains.
 *  Thread Starter [ssmk](https://wordpress.org/support/users/ssmk/)
 * (@ssmk)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779727)
 * In that case, it doesn’t make a whole lot of sense to figure out what firewall
   settings are interfering with the subdomains.
 * Even if I can figure out what settings allow the apps on my other subdomains 
   to function properly, that doesn’t mean that other applications installed in 
   the future won’t have any problems.
 * To avoid the hassle in the future, I will simply remove AIOWPS and explore other
   options.
 * There really should be a way to prevent this plugin from interfering with anything
   beyond the WP instance it is installed on.
 * I’m sure I’m not the only one out there with non-WP apps running on subdomains.
 *  Plugin Contributor [wpsolutions](https://wordpress.org/support/users/wpsolutions/)
 * (@wpsolutions)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779730)
 * The firewall rules will not always behave the same on every site because some
   sites can have some sort of unique quality in their setup.
    This is why we recently
   introduced the custom firewall feature to allow people to tweak rules to suit
   their respective setup.
 *  [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779951)
 * [@ssmk](https://wordpress.org/support/users/ssmk/) – htaccess files are hierarchical/
   recursive as you have already (painfully) figured out. So what you need to do
   is to tell the parent htaccess file not to apply its rules to child folders/sites.
 * This forum topic covers htaccess files for Multiple Website Domains – hierarchy,
   structure, relationship and has the solution you need:
    [http://forum.ait-pro.com/forums/topic/htaccess-files-for-multiple-website-domains/](http://forum.ait-pro.com/forums/topic/htaccess-files-for-multiple-website-domains/)
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779997)
 * I am marking this thread as resolved. No replies in 3 months.
 * Thank you

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘.htaccess causing problems on subdomains’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-security-and-firewall/assets/icon-256x256.
   png?rev=2798307)
 * [All-In-One Security (AIOS) – Security and Firewall](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/reviews/)

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [subdomain](https://wordpress.org/support/topic-tag/subdomain/)

 * 11 replies
 * 4 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/htaccess-causing-problems-on-subdomains/#post-6779997)
 * Status: resolved