WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] Blog in Directory Questions (14 posts)

  1. Jakets
    Member
    Posted 4 years ago #

    I use my blog in a directory (/blog) and W3 always wants a .htaccess in /blog.

    I don't like using one there because I run the site from the main directory and if I include a .htaccess in /blog it actually causes some conflicts with things. I have told it to ignore this and put the re-write rules in my main .htaccess. I cannot tell if the plugin is ACTUALLY working with it like this or if it is simply using basic disk caching then. When I view the source everything shows correctly like it should, so does this mean it is working?

    You can check my site at: http://farmvillefanatic.com/

    Thanks.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Posted 4 years ago #

  3. Jakets
    Member
    Posted 4 years ago #

    I will take your word for it then, is there any way you can make it work better with blogs in directories? It wont let me de-activate the plugin and re-activate it without first creating a .htaccess in /blog and making it writable. I then have to delete it afterwords and setup the code in my main .htaccess.

    I also don't see what you were showing me with that link, it just gives me a standard 404 not found.

    Thanks! I just upgraded to your latest version a few minutes ago.

  4. Frederick Townes
    Member
    Posted 4 years ago #

    I was showing you that cache files were being created. You said that you still have this issue with the 0.8.5.2 release?

  5. Jakets
    Member
    Posted 4 years ago #

    Yep, still have it with 0.8.5.2

    I'm off to bed right now, but let me know if you need any other information and I will get back to you tomorrow.

    Thanks

  6. Frederick Townes
    Member
    Posted 4 years ago #

    Can you specify what the conflicts are, because if you move the .htaccess file you have to manually update the paths in the directives. You are free to do what you wish with the plugin, but I'm not going to formally support this case.

  7. Jakets
    Member
    Posted 4 years ago #

    So you won't support WordPress installs in directories? I'm not sure how to better explain the issue, its exactly like I said. What paths would I need to manually change? the directory is /blog and the install runs from the main directory where my .htaccess is. I followed this guide for my install: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Thanks

  8. Frederick Townes
    Member
    Posted 4 years ago #

    So you won't support WordPress installs in directories?

    This is already supported. What's not supported is having .htaccess in another directory other that the blogs root directory.

    If we're still not understanding each other you can submit a bug submission from the support tab of the plugin.

  9. Jakets
    Member
    Posted 4 years ago #

    Ok.

    I have it setup like this:

    / <-- .htaccess is here and this is where the index is and the site displays from
    /blog <-- Blog installed here, but site is setup and showing from /

    When I activate the plugin it wants a .htaccess in /blog, it doesn't seem to see the one I have setup in /

    If this is not whats supposed to be happening I will try and submit a bug report.

    Thanks

  10. Frederick Townes
    Member
    Posted 4 years ago #

    I'm trying to indicate that it really cannot work another way. WordPress works the exact same way. If you want to move the file somewhere else you have to edit the paths in the directives manually.

    I really suggest fixing other conflicts instead of trying to change this behavior unless you are able to fix this yourself. I cannot write instructions for custom implementations for everyone. However you can try something like this (this is not perfect, just an example):

    # BEGIN W3 Total Cache
    <IfModule mod_setenvif.c>
        SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
    </IfModule>
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /custom-blog/
    .....
        RewriteCond /var/www/vhosts/wptest.w3-edge.com.ua/custom-blog/custom-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
        RewriteRule custom-blog/(.*) /custom-blog/custom-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
    </IfModule>
    # END W3 Total Cache
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /custom-blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /custom-blog/index.php [L]
    </IfModule>
  11. Jakets
    Member
    Posted 4 years ago #

    Alright, thanks for the help. Earlier in this thread you told me it was working, so I'm not sure why I need to edit the .htaccess paths? Obviously this is over my head, so I guess I will just call it quits and go with what its doing now...

    Thanks again.

  12. Frederick Townes
    Member
    Posted 4 years ago #

    Well I saw the file created and if the .htaccess was in the blog's root directory it was working.

  13. filmc
    Member
    Posted 4 years ago #

    my htaccess is

    # BEGIN W3 Total Cache
    <IfModule mod_setenvif.c>
    SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
    </IfModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [OR]
    RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
    RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
    RewriteCond /xxxxx/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
    RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
    </IfModule>
    # END W3 Total Cache

    it is right?

  14. Frederick Townes
    Member
    Posted 4 years ago #

    RewriteBase is missing. Check carefully, since I'm not testing it it will be pretty obvious to you if it's working or not.

Topic Closed

This topic has been closed to new replies.

About this Topic