WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Revision 264695 breaks .htaccess (28 posts)

  1. Modderbaard
    Member
    Posted 3 years ago #

    Revision 264695 breaks .htaccess in docroot resulting in a 500 error.

    (after upgrading from a previous development version)

  2. Modderbaard
    Member
    Posted 3 years ago #

    From the error_log:
    [Tue Jul 20 13:59:55 2010] [alert] [client 82.93.249.226] ***/html/.htaccess: RewriteCond: bad flag delimiters

    A complete reinstall of the plugin didn't solve the problem. (But I did not reset all the plugin options).
    I put back the older revision...

  3. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    You have to make sure that the directives from the previous release are removed from .htaccess. Some of the directives were changed to better handle spaces in user agent strings.

  4. mirsasha
    Member
    Posted 3 years ago #

    Hello, I installed version 0.8.5.2 on a development site (running WP3.0) and it nuked my existing .htaccess file. I had to rebuild it - thankfully I could remember many of the special re-write rules I had in there. Did I miss something in the install about a way to preserve your existing .htaccess file?

    Thanks!

  5. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    I don't know what nuked means specifically. v0.8.5.2 does not officially support v3.0.

  6. mirsasha
    Member
    Posted 3 years ago #

    Sorry - it wrote over the existing file so that all my re-write rules for permalinks, etc were lost. And...oops about the 3.0! Good thing I'm working in a test environment.

    Thanks for the speedy reply.

  7. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    W3TC doesn't overwrite it appends only. If you can demonstrate a case to the contrary, let me know how to duplicate.

  8. Modderbaard
    Member
    Posted 3 years ago #

    Will try that. Thank you! :)

  9. Modderbaard
    Member
    Posted 3 years ago #

    New version (!) destroys also a clean .htaccess rendering my website unusable. (500 error as mentioned above) Guess i have to go back to an old development version...

  10. anteck
    Member
    Posted 3 years ago #

    Upgraded...

    500 Error.

    Went back and cleaned up my .htaccess file to original *without any W3 Cache rules in it)...

    Deactivating & Reactiving the plugin causes a 500 error, even with a fresh new .htaccess file.

    Bad move dude, this is gonna break a lot of installs, and most won't know what to do...

  11. mirsasha
    Member
    Posted 3 years ago #

    W3TC doesn't overwrite it appends only. If you can demonstrate a case to the contrary, let me know how to duplicate.

    I don't know how to demonstrate other than to say that's exactly what happened to me.

  12. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    @mirsasha - can you duplicate the issue so I can understand the case, that's happening here?

    @anteck - I cannot duplicate the issue on a clean installation. If you'd like to help me out by writing me directly it would be appreciated.

  13. Modderbaard
    Member
    Posted 3 years ago #

    I managed to resolve it like this:

    • create export of settings in old version of plugin (revision 264695 development version in my case).
    • reset all setting in old plugin to default
    • disable (and remove) old plugin
    • make sure .htaccess in docroot is 'clean'
    • install new version
    • Do all settings in new by hand, not an import (using old export file as a guide).

    I think the problem has something to do with the settings from one of the 0.9 development releases. Resetting it all to default before uninstalling seems to resolve the problem.

    @fredericktownes: try to duplicate the issue after installing 0.9 rev. 264695, and the trying to upgrade. Could be due to a specific setting though. I still have my old settings form the revision. I will e-mail these via w3 edge web site contact form.

    Thanks for the great work! :) I love the plugin.

  14. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Unfortunately, not everyone has used development versions, so this test isn't enough. Anyway a minor release will be out shortly.

  15. Sharunas
    Member
    Posted 3 years ago #

    After upgrading to newest version it broke my site - I see - 500 internal error.

    I'm don't know any coding or somethink and contacted my host provider asking help with this - they sad .htaccess.
    is configured incorrect and they fix that with bak file or something I don't know.

    Now all my sites is back - but w3 tatal cash does'nt work I see this:

    You've selected disk caching with enhanced mode however the .htaccess file is not properly configured. Please run chmod 777 /home/neobank/public_html/sydneyphoenix.com/.htaccess, then "try again"

    To manually modify your server configuration for enhanced mode append the following code:

    # BEGIN W3TC Page Cache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_USER_AGENT} (2.0 MMP|240x320|ASUS|AU-MIC|Alcatel|Amoi|Android|Audiovox|AvantGo|BenQ|Bird|BlackBerry|Blazer|CDM|Cellphone|DDIPOCKET|Danger|DoCoMo|dopod|Elaine/3.0|Ericsson|EudoraWeb|Fly|HP.iPAQ|Haier|hiptop|htc|Huawei|i-mobile|IEMobile|J-PHONE|KDDI|KONKA|KWC|KYOCERA/WX310K|LG|LG/U990|Lenovo|MIDP-2.0|MMEF20|MOT-V|MobilePhone|Motorola|NEWGEN|NetFront|Newt|Nintendo Wii|Nitro|Nokia|Novarra|O2|Opera Mini|Opera.Mobi|PANTECH|PDXGW|PG|PPC|PT|Palm|Panasonic|Philips|Playstation Portable|portalmmm|ProxiNet|Proxinet|Qtek|SCH|SEC|SGH|SHARP-TQ-GX10|SIE|SPH|Sagem|Samsung|Sanyo|Sendo|Sharp|Small|Smartphone|SoftBank|SonyEricsson|Symbian|Symbian OS|SymbianOS|TS21i-10|Toshiba|Treo|UP.Browser|UP.Link|UTS|Vertu|WILLCOME|WinWAP|Windows CE|Windows.CE|Xda|ZTE|vodafone) [NC]
    RewriteRule .* - [E=W3TC_UA:_mobile]
    RewriteCond %{HTTP_USER_AGENT} (iPhone|iPad|iPod) [NC]
    RewriteRule .* - [E=W3TC_UA:_apple]
    RewriteCond %{HTTPS} =on
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{SERVER_PORT} =443
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php) [NC,OR]
    RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
    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 "/home/neobank/public_html/sydneyphoenix.com/wp-content/w3tc/pgcache/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" -f
    RewriteRule (.*) "/wp-content/w3tc/pgcache/$1/_index%{ENV:W3TC_UA}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache

    and another.:

    The required directives for fancy permalinks could not be detected, please confirm they are available:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Damm I don't know coding - one time used file zilla to instal the script.... thats all!

    Now I'm completely confused and don't know what to do. :/

  16. Sharunas
    Member
    Posted 3 years ago #

    Any help out here?

  17. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Sorry for the trouble. Do you know how to change permissions on the file as the message shows?

  18. Lee
    Member
    Posted 3 years ago #

    Bumerangas,

    Edit your .htaccess file (it's in your domain's root directory, same place as index.php and /wp-content etc...). Add these lines to it:

    DirectoryIndex index.php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Make sure you leave a carriage return after the final line (press Enter/Return). Then change the .htaccess file's permissions to 777 (Read, Write and Execute for all users). In fact, it should be fine (and safer) at 644.

    Once done, re-activate the plugin and you should be good to go.

  19. Sharunas
    Member
    Posted 3 years ago #

    No or at least I wasn't successful - or tried to do thru filezila, but just got again "500 internal server error" and my host help putted another htaccess, file BAK :/

    Can you give me some advice how to solve my problem? Until now the pluggin was just great and increased my pages speed time regarding Yslow results.

    Waiting replay.

  20. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    v0.9.1 should be available shortly. Meanwhile, you can check out this link: http://wordpress.org/support/topic/411535?replies=13#post-1612692

  21. Sharunas
    Member
    Posted 3 years ago #

    Do new update will fix errors automatically?

    Thank You for replaying.

  22. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    It will upgrade without error if that's what you mean.

  23. Sharunas
    Member
    Posted 3 years ago #

    I just want get rid of my currently errors, and I want to use "w3 total cashe", because I think this plug in is reliable tool. That's all.

  24. Sharunas
    Member
    Posted 3 years ago #

    All works great again, after upgrade. Thank!

  25. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Great.

  26. Rajesh
    Member
    Posted 3 years ago #

    Frederick, 500 server error haunts me... One situation where it usually happens is when i try to preview a post before i hit publish...

    I am using the latest version 0.9.1 and i faced this problem in previous versions too...

  27. indole
    Member
    Posted 3 years ago #

    I am getting 401 errors on any minified code.

    I did get an error in the W3T Cache interface notifying me that it couldn't write to /w3tc/min/.htaccess -I 777'd the directory and clicked the retry button. The error went away, but there is no .htaccess file there and the 401 remains.

    I'm on 9.1.1...

    -Zach Lym

  28. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Can you deactivate and re-activate the plugin?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic