Relative URLs and Absolute URLs

Web hosting discussion, programming, and shared and dedicated servers.
1 post Page 1 of 1
by ben1960 » Fri Jul 07, 2017 8:52 pm
My website has menu of internal links that is in its own file. I use jQuery to insert this file into an <aside> tag. In order for this menu to work in all levels of sub-folders, this menu must use absolute URLs. I use a PHP variable, stored in its own file, to set the value of each web page’s <base> tag according to whether the page is on my XAMPP local host, or on the Sonic server.

This setup means that I can only use absolute URLs. I would prefer to have the option of using relative URLs when relative URLs are more convenient for the task at hand.

Can anyone tell how to achieve this, or even just suggest a search engine query that would help me find an answer?
1 post Page 1 of 1

Who is online

In total there are 18 users online :: 0 registered, 0 hidden and 18 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 18 guests