WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Super Cache]The meaning of the .htaccess file (2 posts)

  1. Anonymous
    Unregistered
    Posted 5 years ago #

    Hello, I need to use some urls like http://www.test.com/?tag=%e6%b3%a2%e6%96%af%e7%ba%b3, which is the UTF-8 encoded Chinese words. It can't be parsed in WP Super Cache, as I tested. But it's not the problem( Of course if WP Super Cache would do the change and enable those urls can be parsed, it will be happy to me and millions of East Asian users).

    The problem is, when I using FireFox, it works fine, but when IE, it returns to the main page.

    Obviously, if I can set WP Super Cache not to deal with those urls, it can be accessd normally. I found (when logged in) Firefox's cookie contains a "wordpress" word but IE does not. The rewrite rule WP SuperCache made me to add in the .htaccess file, includes that:

    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$

    So can it possiblely if I have logged in, the wordpress doesn't be cached in Firefox, but cached in IE?

    For test, I added another RewriteCond:

    RewriteCond %{QUERY_STRING} !.*tag=.*

    Then it works well, both in FF and IE. But I don't know whether the pages with urls like that be cached or not?

    In FF(not log in):

    `<!-- Dynamic Page Served (once) in 3.711 seconds -->
    <!-- Cached page served by WP-Cache -->`

    In FF(log in):

    <!-- Dynamic Page Served (once) in 3.696 seconds -->

    In IE:

    <!-- Dynamic Page Served (once) in 3.696 seconds -->

    Do that mean FF used the cache when guest access, other two didn't?

    My question is:what is the use of the "wordpress" in this RewriteCond, and when will a cookie contains a "wordpress" keyword? Can I remove the keyword, or if I do remove it, what will happen?

    Thanks for your time and consideration, and sorry for my poor english.

  2. Donncha O Caoimh
    Member
    Posted 5 years ago #

    The reason your ?tag= url wasn't cached is because of the "?". If the URL was /tag/text/ then it would work fine.

    The "wordpress" is the cookie WordPress leaves for logged in users. Your mod_rewrite rule stopped the other rules serving static cached files.

Topic Closed

This topic has been closed to new replies.

About this Topic