Relative addressing using the same cgi-bin directory

Here's how you address something in your own cgi-bin directory:
<a href=./next_file.pl>text to click on </a>
The text `./' tells us to use the same directory we are in (presumably `~user/cgi-bin' or `/user/public_html/cgi-bin').

Relative addressing using the public_html directory

Here's how you address something in your own public_html directory from your cgi-bin directory:
<a href=../next_file.html>text to click on </a>
The text `../' tells us to use the first backwards directory relative to where we are(presumably `~user/cgi-bin' or `/user/public_html/cgi-bin'), i.e., ~user or /user/public_html/.

Sometimes you need or want to use someone else's work

Here's how you address something in my public_html directory from your cgi-bin directory:
<a href=../../../cdavid/public_html/next_file.html>text to click on </a>
The text `../../../' tells us to use the backwards directory starting at
/user/public_html/cgi-bin/
and going backwards below your own root, and the forward to mine, first to
/cdavid/
then to
/cdavid/public_html/
and finally to cgi-bin if needed.