Should I use a relative or absolute url?

There is nothing more annoying then moving a website to a new domain name, and finding you, or somebody else, used a ton of absolute links.

Now you have to scour code and articles to fix them, since they are pointing to the old domain. Is there a better solution? Enter, relative links. oookay, first things first. What’s the difference? orly? An absolute link uses the entire domain name to point to your resource. so if you want to include a url in your website, if you used a absolute link it would look like this. absolute link You can see there is a full url path included. (ht tp: // www.fancywebsite.com) Now, a relative link is when the server already knows where the file or resource is. A relative link looks like this. relative link In this example you can see there is no full url such as a .com oic Relative URLs are great if you move your site. With Joomla 1.5 you have very little changing to do in your configuration.php. You only have to change 2 values in that file and your site is moved. If you are in the habit of using absolute urls in your content, your website designs, or your images, now is the time to fully understand how cool relative links are, and how they will save you considerable amounts of time over the long haul.


  • Where is that Joomla module published? 3 simple ways to find out.

    Have you ever looked at a Joomla website and wondered “Where is that module published”? You’re not alone – it’s one of the most......

  • Week 1 update of Morph second beta

    It’s been another super productive week of bug-fixing, general refinements and even a couple new features added to Morph. We have received some awesome......

  • Tags: , ,

    2 Comments

    Leave a Comment |  RSS feed for comments on this post.

    Trackbacks / Pingbacks

    Leave a Reply