Correct “base path” terminology
-
18-02-2021 - |
Question
Consider a website installed in the 'mysite' directory:
/var/www/html/mysite/index.php
document root = /var/www/html
url = www.mysite.com/mysite/index.php
What would you call the following:
- /var/www/html/mysite/ index.php (Base path? Root path?)
- /var/www/html /mysite /index.php -or- www.mysite.com /mysite /index.php (Path? Base path?)
- www.mysite.com/mysite/index.php (Base URL)
I can't seem to come up with a clear cut name to distinguish 1 and 2.
Solution
I'm from a ruby-on-rails background but...
1) either base-path or root path are used for this. Pick one and be consistent :) 3) in RoR we call this the "root url" but it's also kinda the "home path" too. as to 2 - it doesn't occur in rails (or at least we don't have a name for it)
it sounds like the following would be consistent without confusing them all:
- base-filepath == /var/www/html/mysite/ /index.php
- root-filepath == /var/www/html /mysite /index.php
- root-url == www.mysite.com/mysite/index.php
An alternative would be:
- root-filepath
- home-filepath
- home-url
my 2c :)
OTHER TIPS
Turns out these can be referred to in a variety of ways. I'll list them here as I find them:
In Django:
2 = script_prefix