So here, in the Miva Merchant Admin I’m going to navigate to the Storefront page and you’ll notice inside the head tag right after the title there’s this base href and then it has a Miva entity for the global base href. So this gets output dynamically. This base href is on every single Miva Merchant page template. It resets the web root for all relative urls. Now, you may be asking, well where does this variable define that? Let me know you. It’s defined under domain settings. So here, under site configuration, we have this Base URL for Graphics: this is what Miva uses as the base href, so by default it’s always going to be defined to mm5, which is Miva’s root folder. However, say for example you wanted to change it to a different folder or remove mm5 altogether, this is where you would do it. Whatever value you have in this field will print out as your base href. Let’s just back to the front end and see how this works. So here I am on the Miva Merchant Storefront and I’m going to view the source of this page. So you notice, right after the title tag here is this base href and it’s exactly what was defined under our domain settings.
I have a few examples that if I jump back to the text editor, so here’s that same stylesheet. So here’s a relative url where it has css which is the folder, 00000001 another folder and then cssui.css the file. Normally, when you write something like this you would think it’s relative to the web root. However, because we have the base href we set to mm5, it’s relative to the mm5 folder.
There’s also root relative urls. The big difference between these two is that this one contains a slash in the beginning and this one doesn’t. That slash resets the path to the web root. When you have a root relative url this will actually bypass the base href and go straight to the web root. So, in this use case the path wouldn’t be correct because the real path is /mm5, so using a root relative url in this case wouldn’t work.