HTML Forum

The title of this thread might be misleading, but I'm pretty sure this question belongs to this part of the forum, if not, feel free to say it :)

I created a php include to have it across all of my websites (some sort of community thing to help those sites with lower traffic) and I want it hosted on my main site and include it on all others using the absolute url/path to the included file as well as the css to it, that works fine so far...

My problem is that when I link the sites the absolute URLs get treated as relative so what should go to "https://www.site1.net" goes to "www.mainsite.com/www.site1.net"