We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3035
    • 3 Posts
    Hi
    Using mod rewrite as suggested which works.

    eg RewriteRule ^(.*)$ /modx/index.php?q=$1 [L,QSA]

    Also using wayfinder, to generate navs etc.
    The problem is, the links it generates are /modx/page-name.html instead of /page-name.html
    I think wayfinder uses the modx->makeUrl method.
    Looking around, i saw instances of a global variable called base_url, which gets assigned to member variable ($this->config). I would have thought this was stored in the config table.
    Doesn’t seem to be.
    Any ideas on how to set the output of wayfinder to generate the correct url?
    System is installed in /httpdocs/modx
    THanks.

      • 32982
      • 674 Posts
      i think is the correct way but test putting the original .htacces and thiink it works
        Jabiertxof (formerly XYZVISUAL)
        My bussines: http://marker.es
        https://www.youtube.com/user/jabiertxof/videos
        • 3035
        • 3 Posts
        I know its not the mod rewrite rules.
        WHen a dump the $this->config from the parser file, i get
        [base_url] => /modx/
        [base_path] => /var/www/vhosts/mysite.com/httpdocs/modx/
        [site_url] => http://mysite.com/modx/
        I can’t find any of these setting in the database.
        Is it perhaps an auto generated text file someplace?
        Or is it just generated off the actual file path where the files live?
        so what im wondering why/how i can change the base_url, and the site_url so that modx produces links at root level. ie not /modx/link
        but /link.

          • 32982
          • 674 Posts
          it happens because the modx instalation is under a root subditectory and i think is the correct way if it doesnt do all links of the pages dont work.
            Jabiertxof (formerly XYZVISUAL)
            My bussines: http://marker.es
            https://www.youtube.com/user/jabiertxof/videos
            • 3035
            • 3 Posts
            I think the easiest way to fix it is to change the doc root in apache. Not ideal though...
            Be good if someone can tell me if its a bug? Could it be wayfinder?
            I mean its fine that the friendly urls and aliases work etc, but if the menu links that are generated aren’t correct, then the site has the wrong url.