is there a way i can get the current (relative) url in the broswer?

so say a page is on www.domain.com/folder/file.php it would return folder/file.php

i need to do this so that i can return a user to the previous page they were at after they login.

Thanks.