Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between base url and base link url?

Tags:

url

php

magento

Every time when we setup new magento site or configure site to live domain we put base url and base link url same, but I haven't gone in deep why we put same? If both should contain same url then why magento have this field?

I just want to know is there any special purpose for this field. Hope someone will clarify me.

Thanks

like image 750
Gulshan Maurya Avatar asked Apr 01 '15 07:04

Gulshan Maurya


People also ask

What is a base URL?

Base URL: The consistent part or the root of your website's address. For example, http://www.YourDomain.com. Relative URL: The remaining path given after the base URL. For example, /contact_us, /seo/blog/new_post.

What is base URL and base path?

basePath is the URL prefix for all API paths, relative to the host root. It must start with a leading slash / . If basePath is not specified, it defaults to / , that is, all paths start at the host root. Valid base paths: /v2.

How do I find the URL URL of a base?

To find the base URL of your website, go to the site's front page. What you see in the address bar on your site's front page is the base URL of your website.

How do you write a base URL?

Base URL should be absolute, including the protocol: $config['base_url'] = "http://".$_SERVER['SERVER_NAME']."/mysite/"; This configuration will work in both localhost and server.


1 Answers

Magento for the most part uses base_url for its URL generation. If you do a grep on the app folder, you'll find that base_url returns 200 hits in 46 files, while base_link_url returns 29 hits in 9 files

The base_link_url is used in the following:

  • XmlConnect module(s)

  • Paypalflowlink module(s)

Yep, that's about it. For everything else there's base_url

like image 53
Nick M Avatar answered Sep 30 '22 21:09

Nick M