Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Absolute or relative urls question

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 10-16-2018, 11:50 PM
 
snowboard snowboard is offline
 

Senior Member
  
Join Date: May 2007
Posts: 111
 

Default Absolute or relative urls question

Hi all,

When making static pages, and I code in links to other pages on my sites, and to images, if I specify absolute url eg

//www.myurl.com/page-name/

will this still work, because from what I understand x cart uses relative urls and a base url in the code?

Also any advantage of using absolute urls?

Thanks!
__________________
version 4.1.7
Reply With Quote
  #2  
Old 10-17-2018, 05:15 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Absolute or relative urls question

Both relative and absolute will work as long as the document you are referring to exists at that location.

The advantage is when using relative urls. If you ever move your site to another domain or a subdirectory of the original one the relative urls will continue to work while the absolute ones will stop working - the path to the page will change.

It is always better to use relative urls.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:21 AM.

   

 
X-Cart forums © 2001-2020