Page 1 of 1

Relative links vs. Absolute links

Posted: Thu Sep 14, 2006 4:12 pm
by SamTzu
first - thx for this great CMS.

It's one great failing (from my point of view) is that it still rely too much on absolute links.
( ie.    instead of just    ./index.php      )

When users try to move their site from one address to a another address (this happens quite a lot) they can't do this easily.
There is a quide how to do this on my site but it's not for beginners.

I have been working on a on a new version of my Virtual Application (VAPP) Joomla ( that would be so easy that
anyone could just start the VAPP and surf away.
Problem is that everyone who starts the VAPP will have different address.
There is no easy way to change all the absolute links to new absolute links.

Now can we get rid of the absolute links?
If not I would like to hear some of the arguments to keep them.
Perhaps we can work something out... :P

Sami Mattila

Re: Relative links vs. Absolute links

Posted: Tue Oct 03, 2006 5:07 pm
by jabberwock
The reason for the absolute links is all the links on the pages are generated automatically based on the config file. For each of the components/modules/mambots, to write out a link, we use a function  serRelToAbs() that makes the SEF urls work correctly. Therefore moving the sites is as easy as going into configuration.php and changing the mosConfig_live_site variable to the new location. So I'm not sure where your having a problem.

The absolute links are also supposedly favored by Google and the other search engines and supposedly give a slightly higher weight to abolute links than just relative ones.

Hope that helps

Re: Relative links vs. Absolute links

Posted: Wed Oct 04, 2006 1:15 pm
by SamTzu
I actually found a partial solution for my problems.

Since my Virtual Application (VAPP) uses Dynamic Host Control Protocol (DHCP) in the beginning for 'ease of use' so Joomla was difficult to implement on it.

Then I found out I can use this on my VAPP Joomla configuration.php...

Instead of using this line...
$mosConfig_live_site = '';

Use this line to always create a dynamic site name...
$mosConfig_live_site = 'http://'.$_SERVER['HTTP_HOST'];

How ever this creates another problem.
What I'm actually looking for is a way to have this dynamically...
$mosConfig_live_site = '';

Something that would check your DNS name from the IP dynamically and substitute Joomla configuration.php with it.

THEN all would be well in the land of Joomla.

Untill then I just keep hoping that we can at least soon be able to change the 'LiveSite' config from the Admin panel front end.

Sami Mattila - Joomla for ever.
I like to live in hope said the worm.

PS. If you want to see how complicated it is to change it now just take a look at my help article on this particular matter... ... dress.html