I am having a problem with my URL Shorthands in my .htaccess.
Namely, everything works fine with this (now old) code...
# URL ShortCut Maker.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} .(.+)$
RewriteRule ^(.) ?open=encyclopedia&letter=$1&term=%1 [B,L,NC]
It shows URL correctly as example.com/Modesty
(it shows the page as if the URL would be /?open=encyclopedia&letter=m&term=modesty
), but the problem occurs when I enter:
example.com/Šanti
, or
example.com/Đin
, or
example.com/Žal
,
example.com/Čakra
, or
example.com/Ćof
...
...if I enter any of these URLs - it shows the page as if I would enter:
?open=encyclopedia
and not as
?open=encyclopedia&letter=Š&term=Šanti
EDIT: Non-English letters in question/problem.
Any solution to this?
You can change your existing rule with rule:
Negated character class
[^\x00-\x7F]
matches any character outside ASCII range.