Get fullurl untill "?"

I’m using modrewrite in my urls but sometimes add additional variables like this:

Now, is it posible to get the full url but only until the “?”…

I’m getting the full url with this for now:


Any help is apriciated…

This was actually discussed very recently, have a read through the following thread