What is this called

What do you call the following…


	http://local.dev3/

	http://www.MySite.com/

Are they “Host Names”?

Debbie

I would call them URLs or URIs.

The hostnames would be local.dev3 and www.MySite.com but since they include http:// this to me is why I would refer to them as URLs.

They are note hostnames, although a hostname is a part of the described strings.

How about “Base URL”?

Debbie

That would be what you might use to refer to that part of the something longer that started with that that. It might also be referred to as the home page if you are talking about multiple pages on the site.

There is no one particular name for that particular combination. The two parts of it do have specific names and are the protocol (the http: part) and hostname.

How about “Base URL” or “Base URI”?

I use those terms because this is a URL too…

www.MySite.com/articles/2011/december/some-article.php

And the key point to my OP was “What do I call the thing which maps to where my index.php file is physically located in the Web Root?”

Debbie

I don’t know as if I’ve ever heard of the term Base URL being used, but that would certainly work here. It’s the Base URL because there is no specific file name in the URL.

It could be called just that, Web Root.

It can also be referred to just as the homepage for those websites or those URLs.

These terms used mostly in context.

“What URL are you going to?” – For this you would need the full web address that you are going to which might be http://www.thesite.com/thesection/thepage/thepart/number3.html"

“What website are you going to?” – For this you might just say, thesite.com or www.thesite.com.

You don’t often hear the phrase “Visit our website at http://www.thesite.com/thesection/thepage/thepart/number3.html” instead you’d hear, “Visit our website at www.thesite.com

Okay.

It could be called just that, Web Root.

Don’t go there, because that is what started this entire thread… :eek:

I have a Config File and this summer I started calling the above Base URI’s “Web Roots” and I was corrected last week that they are NOT Web Roots because the Web Root is a physical location where your files reside on the Web Server.

It can also be referred to just as the homepage for those websites or those URLs.

But I needed a name for my Config File…

These terms used mostly in context.

“What URL are you going to?” – For this you would need the full web address that you are going to which might be http://www.thesite.com/thesection/thepage/thepart/number3.html"

“What website are you going to?” – For this you might just say, thesite.com or www.thesite.com.

You don’t often hear the phrase “Visit our website at http://www.thesite.com/thesection/thepage/thepart/number3.html” instead you’d hear, “Visit our website at www.thesite.com

Here is my corrected Config FIle. Maybe it will help you see what created my Original Post…


<?php
[COLOR="#FF8C00"]	// Website Environment
[/COLOR]	define('ENVIRONMENT', 'development');
	//define('ENVIRONMENT', 'production');


[COLOR="#FF8C00"]	// Web Root (aka Document Root) (**Physical Location)
[/COLOR]	define('[B]WEB_ROOT[/B]', ENVIRONMENT === 'development'
					? '/Users/user1/Documents/DEV/++htdocs/05_Debbie/'
					: '/var/www/vhosts/MySite.com/httpdocs/');


[COLOR="#FF8C00"]	// Base URL (**Virtual Location)
[/COLOR]	define('[B]BASE_URL[/B]', ENVIRONMENT === 'development'
					? 'http://local.debbie/'
					: 'http://www.MySite.com/');
?>

Thanks,

Debbie

See, I would call what you have as the Web_Root I would call that the DocumentRoot or I suppose Document_Root. But maybe that’s just me.

Apache refers to the physical, file-system path to the beginning of the web accessible structure as the DocumentRoot in it’s configuration. That’s why I always referred to the file-system path, the full physical path on the server, as the DocumentRoot.

WebRoot, to me, signifies that you are accessing it from the web, so it would be the root of the website.

/var/www/vhosts/MySite.com/httpdocs would be the DocumentRoot for a website. And [b]http://mysite.com/[/b] might be referred to as the WebRoot, or the Base URL, or the top-level, website root. I don’t know as if it necessarily has a name.

Well, up until a month ago, I had the same mindset. But then when I was working on Release 2 of my site, some PHP people corrected me on how I was using “Root”, “Web Root”, and so on.

It has been explained to me - and also from what I have read - that “Web Root” and “Document Root” are synonymous terms.

And the key point is that they both refer to where files are PHYSICALLY stored.

Also, the term “Root” always refers to the top-level directory on your system (e.g. Windows = ‘C:\’ and Unix = ‘\’)

In my conversation and research, though, I have NOT been able to easily find a name for what I asked about in my Original Post.

Although after continuing to check, it sounds like both…


	http://local.debbie/

and…


	http://www.MySite.com/

…can be called “BASE URLs” or “BASE URIs” which is a further clarification as to what type of URL/URI they represent.

(I think this is a good conversation that more developers need to have and understand…)

Any other gurus out there want to shed light on this, feel free to jump in, although I’m sticking with the names in my “New & Improved Config File” listed above!! :cool:

Thanks,

Debbie

Why would you put a domain name in the config at all? What’s wrong with $_SERVER[‘HTTP_HOST’] ?
I love using that because then I can move a website from domain to domain without ever changing any configuration (apart from db, of course)

Following the nomenclature of the CMS I use, I would call [COLOR="#FF8C00"]/var/www/vhosts/MySite.com/myfolder/index.php[/COLOR] the server path to index.php and [noparse]http://www.MySite.com/myfolder/index.php[/noparse] the URL (or URI) of the index.php page. (URLs are a subset of URIs that indicate adresses on the web.)