1

If the sub-category's slug is a combination of lowercase letters and Korean, page 404 appears.

enter image description here

1 : NGINX settings

location / {
    try_files $uri $uri/ /index.php?$args;
}

2 : Wordpress - Permerlink settings

  • Custom: /%category%/%postname%/
  • Category Base:.

3 : Wordpress - Yoast

  • Taxonomies > Category URLs ( Remove )

4 : Tested content

4-1 : In case of parent category ✅

  • mywebsite.com/한글 = 200
  • mywebsite.com/a한글 = 200
  • mywebsite.com/한글B = 200

4-2 : In case of post ✅

  • mywebsite.com/한글/post글 = 200 ( lowercase + non-latin )

4-3 : In case of child category ⚠️

  • mywebsite.com/한글/한글 = 200
  • mywebsite.com/한글/a한글 = 404 ❌
  • mywebsite.com/한글/한글b = 404 ❌
  • mywebsite.com/한글/C한글 = 200
  • mywebsite.com/한글/한글D = 200
  • mywebsite.com%2F%ED%95%9C%EA%B8%80%2Fa%ED%95%9C%EA%B8%80 = 200 ⭕️ ( /한글/a한글 : url encoded )
  • mywebsite.com/한글/A한글 = 200 ⭕️ ( /한글/a한글 : uppercase )

5 : Reference question

https://wordpress.stackexchange.com/questions/277401/arabic-characters-in-url-returns-404-error

I think it might be related to @user139986 's answer.

I don't know how to handle this problem .. 😭

2
  • Looking at @user139986's answer (linked in your question): In the .htaccess file, the NC indicates no case, ie, the request should be considered in a case-insensitive manner. This means that, say, ABC = abc = AbC. Does this question and its answer(s) help you out? – Pat J Mar 28 at 4:19
  • @PatJ Thanks for explaining. I guess I misunderstood that it has something to do with user139986's answer. 😓 The lowercase letters are the problem, so it doesn't seem to be related. – son.kor Mar 28 at 5:08
0

⚠️ Temporary workaround

https://stackoverflow.com/a/59109698/15497563

sudo apt-get install nginx-extras

nginx.conf

https://stackoverflow.com/a/11170826/15497563

http {
    # Include the perl module
    perl_modules perl/lib;

    # Define this function
    perl_set $uri_uppercase 'sub {
        my $r = shift;
        my $uri = $r->uri;
        $uri = uc($uri);
        return $uri;
    }';
}

site-enabled

https://stackoverflow.com/a/35369570/15497563

server {
    location ~ ^/(부모/자식a|부모/자식b|부모/자식c)(.*) {
        rewrite ^(.*)$ $scheme://$host$uri_uppercase;
    }
}

Every time you create a sub-category(lowercase letters + non-latin characters), you need to edit it...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.