I am quite happy working with subdomains but I would like to know the proper way to reference the
primary domain folder mydomain.org.uk from mydomain.org.uk/admin. I want to put some generic code here.
Only the parent folder. Unless you are 1 folder deep, …/ will not reference the root directory. To reference the root directory, you begin the reference with a slash. E.g. /folder/index.php