ros wrote:
What regular expression can be used to rewrite this URLs:

from /faq/LANG1/index.html?locale=LANG2 to /faq/LANG2/index.html?locale=LANG2

from /faq/LANG1/foo/index.html?locale=LANG2 to /faq/LANG2/foo/index.html?locale=LANG2

If you want this to behave differently depending upon whether or not LANG1 and LANG2 have the same or different values, you can't do it with regular expressions. What you're asking for is a context-sensitive grammar, which is beyond the realm of regular expressions. I thus fear that any regexp based urlrewrite solution that almost does what you want may well loop forever...

http://en.wikipedia.org/wiki/Chomsky_hierarchy

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to