Title: Problems with subdirectory install
Last modified: August 30, 2016

---

# Problems with subdirectory install

 *  Resolved [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/)
 * Hello,
 * On most of my projects I’m using [subdirectory install](http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory).
   Basically that means that my website _home\_url_ is [http://www.example.com](http://www.example.com),
   but _site\_url_ is [http://www.example.com/wordpress](http://www.example.com/wordpress).
 * Recently, I discovered that some of the rules written by AIOWPS plugin into .
   htaccess file seem not to expect such setup. Namely, all rules that employs `%{
   HTTP_REFERER}` have their value set to _site\_url_.
 * For example, firewall rule that prevents image hotlinking is following: `RewriteCond%{
   HTTP_REFERER} !^http://www.example.com/wordpress [NC]`
    But as such it evaluates
   to true also for legitimate visitors of the site, because their referer starts
   with [http://www.example.com](http://www.example.com), but rarely with [http://www.example.com/wordpress](http://www.example.com/wordpress)(
   this holds only when they come from admin dashboard).
 * Can you confirm the issue? I’m using the recent version of the AIOWPS plugin.
   Would be nice to have it fixed, now I have to remember to manually edit .htaccess
   file whenever I make changes to AIOWPS or remember which features not to use 
   🙂 I think just using _home\_url_ instead of _site\_url_ for referer check should
   solve this problem.
 * Best regards,
    Česlav
 * [https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)

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

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/#post-6282258)
 * Hi, thank you for reporting this finding. One of the plugin developers will investigate
   further your finding.
 * Regards
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/#post-6282471)
 * Hi, are you still having issues?
 *  Thread Starter [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/#post-6282472)
 * Hi,
 * Yes, I’m still having issues – as well as [others](https://wordpress.org/support/topic/images-disappear-after-setting-firewall-prevent-hotlinks)
   have…
 * I already described the problem and the way how to fix it (twice), but either
   you are confused by my description or don’t have time to implement it. Would 
   it be of any use if I prepared a patch and issued a pull request on GitHub?
 * Greets,
    Česlav
 *  Plugin Contributor [wpsolutions](https://wordpress.org/support/users/wpsolutions/)
 * (@wpsolutions)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/#post-6282473)
 * > Would it be of any use if I prepared a patch and issued a pull request on GitHub?
 * Yes that might be best. I will then quickly verify your fix and we can include
   it in the next release.
 *  Thread Starter [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/#post-6282474)
 * Hi, I just issued a pull request: [https://github.com/Arsenal21/all-in-one-wordpress-security/pull/15](https://github.com/Arsenal21/all-in-one-wordpress-security/pull/15)
 * The change is really simple, should be easy to review.
 * Greets,
    Česlav
 *  [mra13 / Team Tips and Tricks HQ](https://wordpress.org/support/users/mra13/)
 * (@mra13)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/#post-6282475)
 * We have merged this change. It will available in the next release.

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

The topic ‘Problems with subdirectory install’ 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

 * [home_url](https://wordpress.org/support/topic-tag/home_url/)
 * [referer](https://wordpress.org/support/topic-tag/referer/)
 * [site_url](https://wordpress.org/support/topic-tag/site_url/)
 * [subdirectory install](https://wordpress.org/support/topic-tag/subdirectory-install/)

 * 6 replies
 * 4 participants
 * Last reply from: [mra13 / Team Tips and Tricks HQ](https://wordpress.org/support/users/mra13/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/problems-with-subdirectory-install/#post-6282475)
 * Status: resolved