We have masterpage which is set programatically to all sites on all site collections.
On masterpage we want to redirect user based on a value to a page in layouts folder.
I have read that the layout folder is common to all users. So of I hardcode a particular url/layouts/filepath then it might throw access denied error based on user permission.
So I want to get the current site url then I will appends /layouts/filepath to this url.