Title: ericstumper's Replies | WordPress.org

---

# ericstumper

  [  ](https://wordpress.org/support/users/ericstumper/)

 *   [Profile](https://wordpress.org/support/users/ericstumper/)
 *   [Topics Started](https://wordpress.org/support/users/ericstumper/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ericstumper/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ericstumper/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ericstumper/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ericstumper/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ericstumper/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CDN Enabler] URLs not replaced when WP is installed in a different directory](https://wordpress.org/support/topic/urls-not-replaced-when-wp-is-installed-in-a-different-directory/)
 *  [ericstumper](https://wordpress.org/support/users/ericstumper/)
 * (@ericstumper)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/urls-not-replaced-when-wp-is-installed-in-a-different-directory/#post-6796353)
 * I was just searching for a proper CDN plugin for wordpress and stumbled upon 
   this thread as I regularly use the Bedrock development stack ([https://roots.io/bedrock/](https://roots.io/bedrock/)).
   This stack uses the WordPress core as a Composer depency and thus keeps it in
   a subdirectory inside the docroot with a structure like this:
 * Document root: /
    Wordpress Core: /wp Wordpress Content: /app
 * The siteurl should never be used to access the wordpress root to reference the
   content dir, as it just points to the core files, but not necessarily to the 
   root. Using home would not necessarily point to the name of the WordPress core
   dir, thus this would also not be a complete approach. I think the site_url has
   to be used in connection with the content dir, which can be accessed via the 
   content_url() function separately.
 * With this I just wanted to point out that having the wordpress core in a subdir
   is not an uncommon usecase indicated by over 2000 Github stars for Bedrock and
   I am totally looking forward to this being integrated into CDN enabler.
 * Thanks a lot in advance!
 * Eric
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] How to use Falcon Engine with custom WP_CONTENT_DIR](https://wordpress.org/support/topic/how-to-use-falcon-engine-with-custom-wp_content_dir/)
 *  Thread Starter [ericstumper](https://wordpress.org/support/users/ericstumper/)
 * (@ericstumper)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/how-to-use-falcon-engine-with-custom-wp_content_dir/#post-6860261)
 * I have just seen your reply, must have been still typing while you submitted 
   it. Thanks for your answer. Could you please add my last post to the support 
   ticket?
 * Thanks in advance 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] How to use Falcon Engine with custom WP_CONTENT_DIR](https://wordpress.org/support/topic/how-to-use-falcon-engine-with-custom-wp_content_dir/)
 *  Thread Starter [ericstumper](https://wordpress.org/support/users/ericstumper/)
 * (@ericstumper)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/how-to-use-falcon-engine-with-custom-wp_content_dir/#post-6860260)
 * So I spend some time searching the corresponding lines.
 * I added this at line 520 in wfCache.php:
 *     ```
       $contentUrl = parse_url(content_url());
       $contentUrl = $contentUrl['path'];
       ```
   
 * And replaced lines 562 and 563:
 *     ```
       RewriteCond "%{DOCUMENT_ROOT}{$pathPrefix}/wp-content/wfcache/%{HTTP_HOST}_%1/%2~%3~%4~%5~%6_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" -f
       RewriteRule \/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)(.*)$ "{$pathPrefix}/wp-content/wfcache/%{HTTP_HOST}_{$matchCaps}_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" [L]
       ```
   
 * with:
 *     ```
       RewriteCond "%{DOCUMENT_ROOT}{$contentUrl}/wfcache/%{HTTP_HOST}_%1/%2~%3~%4~%5~%6_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" -f
       RewriteRule \/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)\/*([^\/]*)(.*)$ "{$contentUrl}/wfcache/%{HTTP_HOST}_{$matchCaps}_wfcache%{ENV:WRDFNC_HTTPS}.html%{ENV:WRDFNC_ENC}" [L]
       ```
   
 * I haven’t tested yet whether this is safe for all kinds of wordpress environments
   though.

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