X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   General questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=66)
-   -   Absolute or relative urls question (https://forum.x-cart.com/showthread.php?t=76593)

snowboard 10-16-2018 11:50 PM

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!

cflsystems 10-17-2018 05:15 AM

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.


All times are GMT -8. The time now is 05:40 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.