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
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With