We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24075
    • 83 Posts
    Hi!

    when i use this code:
    echo 'base path: [[!++base_path]]<br><hr>';

    on screen is:
    base path: /home/www/puschpull.org/www/modx_rev/


    and
    when i use this code:
    echo 'base url: [[!++base_url]]<br><hr>';

    on screen is:
    base url: /modx_rev/


    my testing web is here:
    http://puschpull.org/modx_rev/

    My question:
    what i need this adress:
    /home/www/puschpull.org/www/modx_rev/
    ???
    string www is superfluous !
    /home/www/puschpull.org/www/modx_rev/
      Petr Püschel, Czech Republic
      <hr>
      http://puschpull.org
      <hr>
    • The PATH is the path in the server's filesystem, beginning at the server file root. The base_url is the web server's URL, beginning at the web root. So for a PATH, / means the root of the server file system. For a URL, / means the web server's web root.

      In your case, your hosting is putting everyone's files into /home/www/domain.com/ directories on the server. All of your files are in the /home/www/puschpull.org/ directory, and the web server uses your www directory as its web root (in the case of the web root / means YOUR www directory). Other servers may use public_html or htdocs as the web root directory; using www is common but in this case it's confusing you because they also use a directory named www to contain all of their customer's individual website directories.


      You can use site_url to get the whole URL domain and all.

      [[++url_scheme]][[++http_host]][[++base_url]]


      is the same as

      [[++site_url]]

      [ed. note: sottwell last edited this post 12 years, 2 months ago.]
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 24075
        • 83 Posts
        sottwell: Thanks!
          Petr Püschel, Czech Republic
          <hr>
          http://puschpull.org
          <hr>