WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Super Cache] If permalink has 2bytes characters, cache isn't made. (6 posts)

  1. neko-neko
    Member
    Posted 4 years ago #

    Hello
    I'm using WP Super Cache in Japanese WordPress blog and have a problem.

    In the blog , I configured permalink as /%year%/%monthnum%/%day%/%postname%/
    Post title has Japanese characters so permalink also have 2bytes characters which encoded by percent encoding.

    ex. http://www.example.com/2009/08/22/テスト/
    or http://www.example.com/2009/08/22/%e3%83%86%e3%82%b9%e3%83%88/
    These two URIs are same.

    If the permalink has 2bytes characters, WP Super Cache doesn't display pages from cache and always makes cache dynamically.
    Anyone know how to fix? or can plugin author fix this problem?

    Thank you. and sorry for my poor English :(

  2. neko-neko
    Member
    Posted 4 years ago #

    First access (the permalink has 2bytes characters)

    wp super cache make cache file
    /wp-content/cache/supercache/example.com/2009/08/22/%e3%83%86%e3%82%b9%e3%83%88/index.html

    Second time access

    Cache file exists but .htaccess doesn't rewrite url and wp super cache make cache file again

  3. Pinoy.ca
    Member
    Posted 4 years ago #

    mod_rewrite has problems with unicode and urlencoded urls. The bug has been around for ages.

    Because two urls refer to the same resource, the workaround is lots and lots of symlinks. I doubt donncha will decide to go this route.

    Half-on is the best you can do.

  4. Donncha O Caoimh
    Member
    Posted 4 years ago #

    I could urldecode the request uri before creating the cached file and directories but I don't know if that will have security implications.

    Some filesystems won't allow certain characters to be in filenames for example.

  5. satovic
    Member
    Posted 4 years ago #

    What patch and configs did you use to get the japanese characters to work in the url? I've added the support in the .htaccess* in the webbserver. I also added the wp-multibyte-patch, but can't get the kanjis, hiraganas and katakanas to show. Just a strange combinations of numbers, letters and %-symbols are being shown, like in yur example.

    *

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
  6. Donncha O Caoimh
    Member
    Posted 4 years ago #

    satovic - you're better off using the plugin in half-on mode.

Topic Closed

This topic has been closed to new replies.

About this Topic