2

I don't know if this depends on Wordpress, Nginx, or what else... But I have this problem:

A wp site uses categories names as permalinks, like site.com/catname/. Those name are in arabic.

The url looks something like this:

https://exampe.com/سكس-hd/

which can be translated in 2 different ways:

https://example.com/%d8%b3%d9%83%d8%b3-hd/ https://example.com/%D8%B3%D9%83%D8%B3-hd/

the first one, with lowercases, works, but the second gives a 404. This creates many issues, also in Google indexing.

How can I make the 2 requests point to the same content?


this

$_SERVER['REQUEST_URI'] = strtolower($_SERVER['REQUEST_URI']);

In the index.php fixes the issue but it's a bad workaround

the_nuts
  • 412
  • 6
  • 18
  • Could you move the fix to `wp-config.php` and perhaps make it more selective with a `preg_replace_callback` function? – Richard Smith Feb 07 '17 at 15:28
  • 1
    So it's normal that this URL normalization isn't done by the core or at an higher level? – the_nuts Feb 07 '17 at 18:19
  • I tested some permalinks (without percent encoded characters) on my WP site and it is case insensitive. So I do not understand why percent encoded characters should be case sensitive. – Richard Smith Feb 07 '17 at 18:38

0 Answers0