views:

22

answers:

1

How could I remove the get query from the URI, so I can use this method:

$request->getRequestUri()

And get the URI without the GET query part?

I.e. this:

/module/controller/action/par/val?par2=aaa

I would get:

/module/controller/action/par/val
+2  A: 

Not sure about a ZF-specific way, but I think this would work:

<?PHP
$path = parse_url($request->getRequestUri(),PHP_URL_PATH); 
timdev
I just used current(explode('?', $request->getRequestUri())) after all and it worked great. But thanks!
Richard Knop