How do I know the current URL?
usually, the full url to the current page is stored as a variable in your CMS system. If that is not the case, you can use the methods below to determine the url to the current page. The server side scripts (PHP, ASP or JSP) are preferred for accessibility purposes.
Example in PHP:
<?php $pageURL = "https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; ?>
Example in ASP:
<% pageURL = "https://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("SCRIPT_NAME") %>