Correctly grab the URL

Depending on the context, the url might be different.  For example, the manager controller returns the $url . 'manage/', instead of just the $url.  In this case, we always need just the $url.