Forum

case insensitive rewrite rule with local characters

AxAn
11 January 2016, 20:30
I'm moving a site from Apache to Hiawatha and are having some problems with the URL rewrite (UrlToolkit).
The problem is that I would like to use a case insensitive match for part of the URL. On top of that does it not seem to work with country specific characters like: å ä ö (it is debatable whether to have special characters in URLs but it would be nice to continue to have it)

An example of what I currently have running on Hiawatha is:
Match ^/(test|täst)/.*-([0-9a-z]+)$ Rewrite /index.php?p=7&pid=$2


This would work for:
/test/some-text-here-1234xx


But it does not work for:
/täst/some-text-here-1234xx  //country specific character
/TEST/some-text-here-1234xx //upper case letter
/TÄST/some-text-here-1234xx //combination


I tried to add [NC] at the end of the line without any success.
If this was another reg exp then I would probably add /igu at the end.

Please advice.
AxAn
11 January 2016, 20:31
Forgot to say that I'm running Hiawatha 10.0
Hugo Leisink
8 February 2016, 17:35
Does this [www.regular-expressions.info] solve your issue?
This topic has been closed.