One method would be to use an .htaccess RewriteRule to make URI's that look like that:
to be rewritten like this:
For this, you would use a RewriteRule. Here is an example:
RewriteRule ^agent-profile.php\/?u=(.*)$ agent-profile.php/$1/ [L,NC,R=301]
This will capture anything after the
u= GET param, and the place it in the
$1 of the second param of the rewrite. It will be a permanent redirect (R=301), it will ignore case when matching (remove the NC of the flags if you don't want that), and if this is matched, the .htaccess file will not bother trying any rules after it (L[ast]). This is untested, but should get you going.