Forum

UrlToolkit: Adding get params

Leo Unglaub
4 January 2015, 21:37
Hey,
i have a question about the UrlToolkit. Currently i use the following code:

UrlToolkit {
ToolkitID = batwork
RequestURI = exists Return
Match /(.*) Rewrite /index.php?url=$1
}


With that that all requests get redirected to the index.php and i can use "nice urls". For example domain.tld/foobar/1/edit becomes index.php?url=foobar/1/edit and i can parse that in PHP. However, if the url contains params of there own i have a problem. Because domain.tld/foobar/1/edit?do=redirect now becomes index.php?url=foobar/1/edit?do=redirect.

Do you have any idea how i could tweak the UrlToolkit to fix that one?
thanks and greetings
Leo
Hugo Leisink
4 January 2015, 21:42
UrlToolkit {
ToolkitID = batwork
RequestURI exists Return
Match /(.*)\?(.*) Rewrite /index.php?url=$1&$2
Match /(.*) Rewrite /index.php?url=$1
}
Leo Unglaub
4 January 2015, 21:57
Thank you very much. It works perfekt!
This topic has been closed.