Detect WebApplication's url called by browser

I have a web application used from intranet and accessible at The same application can be reached also from internet at url

Is there a way in which the web app can detects wich is the url called by browser?


or check if the remote IP of the session is in the 192.168.1.x range.

EDIT: Change “remove” to “remote”