A leading slash in a url causes the browser to form a url starting at the domain root. Let's craft a simple url which will be parsed differently by the client and the server: However, it is relative to the serverroot, not the documentroot.
A src=. is executed by a browser and it can only operate using a url. You can see a directory structure in that url, and that directory structure will be used to turn relative paths into absolute paths. In the windows hosts file, dns/resolve each domain name to.
Instead of modifying the code,. $_server['document_root']) and prepend it to any path you're using. The server will see /forum/index.php, and / will parsed as the path. We've pulled over the legacy code that is using the relative path as shown above.
However, on the new server the script shows the path as '/'. When users or bots access a url, they’re automatically directed to the new one. What you can do is use a define statement to set the server root directory in a configuration variable, and then reference that throughout the file in directives that need a. Starting with a slash, as in /console/images/1.jpg) or make them absolute.
If page.htm contains a link to another page and the link.