i’m having a database which is storing geo-data like countries, cities.
i would like to use modrewrite with links like:
mysite.com/europe/austria/vienna
now the problem: in german, some countries contain umlauts like austria = österreich
(i can’t use umlauts in urls)
so my question:
is there a way to create a function inside the database which replaces all special characters when querying like “where validUrl(country)=’oesterreich’ ?
which would replace ö->oe
my only idea so far is adding an extra database field for modrewrite which would hold “oesterreich”
any ideas? thanks
You can create a function in MySQL like so
However as @GolezTrol said, this is not a great idea because of diacritics in other languages.
Link: http://dev.mysql.com/doc/refman/5.1/en/string-functions.html