Question : request.Scheme request.Path
Answered by : worried-wasp-o26egaq7682o
var scheme = Request.Url.Scheme; // will get http, https, etc.
var host = Request.Url.Host; // will get www.mywebsite.com
var port = Request.Url.Port; // will get the port
var path = Request.Url.AbsolutePath; // should get the /pages/page1.aspx part, can't remember if it only get pages/page1.aspx
Source : https://stackoverflow.com/questions/21640/net-get-protocol-host-and-port | Last Update : Thu, 18 Jun 20