There seems to be a bit of confusion here stemming from using filesystem paths.
The DOCUMENT_ROOT folder, as specified in your web server configuration, points to a certain location on the filesystem. That’s literally the root of your web site.
So, “/” when appended to the domain name means the web server should look in this DOCUMENT_ROOT folder for an appropriate index file (in our game, it’s usually called index.php).
The employers folder, if it’s located inside the DOCUMENT_ROOT folder, would be referenced by adding the folder name to the root path
So. “/” + “employers” = “/employers”
To get the web server to server the “welcome_employer.php” file inside the employers folder, which is inside the DOCUMENT ROOT folder, you would need a relative path of
“/employers/welcome_employer.php”
Note that the actual DOCUMENT_ROOT value isn’t in there at all - it’s represented by the first “/”
If you really wanted to supply the absolute web path to this file, you would provide the scheme, domain name and (optional) port as required.
So the absolute path locally might be
http://localhost/employers/welcome_employer.php
And on the production server, it might be
https://www.mywebsite.com/employers/welcome_employer.php
Generally, you’re better off just using the relative path, so your location header would read exactly like this in both local development and production environments
header("Location: /employers/welcome_employer.php");
That leading “/” anchors the request path resolution to being relative to the actual folder that the web server process understands to be the DOCUMENT_ROOT.
Is that anything like the info that you were looking for?