Forums

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

  1. neko-neko
    Member
    Posted 3 months 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 3 months 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 3 months 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
    Member
    Posted 3 months 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 2 weeks 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
    Member
    Posted 2 weeks ago #

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

Reply

You must log in to post.

About this Topic