We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23969
    • 2 Posts
    Hello,

    I have installed Modx for our web site a while back. At that time, I installed modx in a folder named "modx" under my site’s root directory. The web site has been working fine, but all the URLs of my site are prefixed with www.domain.com/modx. I would like to remove the "modx" from the URLs and wondering how I can do it. I thought copying (or moving) the contents of modx folder to the root directory will solve the problem, but it did not. I would appreciate any help you can provide me on this.

    Thanks in advance.

    Sai Pullabhotla

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That will solve the problem, but then you must change all of the links in your configuration and also the .htaccess file that refer to the subdirectory of the original location.

        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
        • 23969
        • 2 Posts
        Thank you very much, Sottwell.
          • 3190
          • 12 Posts
          I had that problem, and it decide:
          Move all modx folders to some subdirectories (etc. ’files’ ) and create index.php,index-ajax.php in root www folder:
          <?php
          chdir('files');
          require 'index.php';
          ?>
          

          and index-ajax.php
          <?php
          chdir('files');
          require 'index-ajax.php';
          ?>
          


          in manager change File Manager Path: ***/files/
          (*** - path to your www-root folder)
          And all works.
          PS:
          But there are some problem with snippets (etc. MaxiGallery), that requered edit paths in code of snippet sad
            • 22303 MODX Staff
            • 10,725 Posts
            That’s definitely going to cause problems as you are changing the working directory MODx (and all of it’s add-ons) expects to work with.