Relative links vs. Absolute links

Locked
User avatar
SamTzu
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Wed Jun 07, 2006 7:18 am
Location: Finland
Contact:

Relative links vs. Absolute links

Post by SamTzu » Thu Sep 14, 2006 4:12 pm

Howdy,
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.    http://www.domainname.com/index.php    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.

Example...
I have been working on a on a new version of my Virtual Application (VAPP) Joomla (http://www.mattila.eu) 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
http://www.mattila.eu
------------------------------------
SamTzu

User avatar
jabberwock
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Fri Aug 19, 2005 6:32 am
Location: In front of my computer in Calgary
Contact:

Re: Relative links vs. Absolute links

Post by jabberwock » Tue Oct 03, 2006 5:07 pm

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
Technology happens. (Andrew Grove)

User avatar
SamTzu
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Wed Jun 07, 2006 7:18 am
Location: Finland
Contact:

Re: Relative links vs. Absolute links

Post by SamTzu » Wed Oct 04, 2006 1:15 pm

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 = 'http://192.168.0.50';

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 = 'http://www.mydomain.com';

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...

http://www.mattila.eu/technology/cms-jo ... dress.html
Last edited by SamTzu on Wed Oct 04, 2006 1:18 pm, edited 1 time in total.
------------------------------------
SamTzu


Locked

Return to “Wishlist Archives - Archived”