Page 1 of 1

Absolute vs. Relative URL

Posted: Thu Dec 26, 2024 5:37 pm
by bhl
Greetings,

I manage a website that uses relative URLs for all local content. For example: page_1/php instead of https://website.com/page_1.php.

The problem I see when creating a new link is that CCount requires you to enter an absolute URL and the generated URL is also absolute.

How do I update the relative URL such that CCount will function without having to replace the relative URL with an absolute URL?

Re: Absolute vs. Relative URL

Posted: Fri Dec 27, 2024 4:52 pm
by Klemen
The URL you enter into CCount must be an absolute one, starting with http(s)://

The generated URL can be used either as a relative or absolute one, so both these should work:
https://example.com/ccount/click.php?id=1
ccount/click.php?id=1

But, honestly, I think you are loosing time and effort over irrelevant details (relative vs absolute).

Re: Absolute vs. Relative URL

Posted: Sat Dec 28, 2024 4:33 pm
by bhl
Thank you. That is what I was looking for. I will test it out. The reason I can't have a bunch of absolute URLs is that during local testing absolute links point to the live site.