We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38425
    • 22 Posts
    This subject has been discussed in other threads, but I found the solutions a little foggy (novice user) and worried they also might be outdated.

    I am using fresh install of MODX Revolution. My server admin didn't want to install MODX into the root directory of our current web site for fear it would mess with the html and php files that are already there.

    (I'm kind of glad he did this, because it may be a while before I get up to speed enough to change my site over to MODX and this keeps things more tidy.)

    SO....

    MODX is currently installed in a subfolder of my domain as follows:

    www.domain.com/modx

    So when I go to view the homepage in my MODX Manager, that's the address that shows in the browser.

    Once I've developed all my site files in MODX, I'm praying someone knows a simple way I'll be able to publish them to the domain root instead of to /modx.

    Sorry if I've overexplained here; all the old threads I read just seemed to get so bogged down, I wondered if they were talking about the same thing.

    And thanks!




      • 10208 ☆ A M B ☆
      • 1,780 Posts
      LOL, I just posted about this with some links, it wouldn't go so I copied it to the clipboard to re-post with. I'm just going to paste it here for you because there's some good links that you'll want to check out.
      *************************************************

      There's a few different ideas mentioned in this thread. I'm currently doing it the sub-folder way with an existing static site although I think I would have tried it the way Gibbs described if I'd know how before I started.

      https://forums.modx.com/thread/73610/the-best-way-to-develop-a-modx-site#dis-post-410309

      Some additional bookmarks I've saved recently on this subject:

      https://forums.modx.com/index.php?topic=27963.0
      https://forums.modx.com/thread/73402/moving-modx-install-up-one-level-same-as-re-install-upgrade#dis-post-408031
      https://forums.modx.com/thread/73312/add-on-domain-and-htaccess-file-setting#dis-post-410056

      Also, before you decide exactly how you're going to do all the sites, take a look at security information:
      http://rtfm.modx.com/display/revolution20/Hardening+MODX+Revolution
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 31946
        • 116 Posts
        Hi dwayne,
        I'm having a site running in a subfolder called modx with no problems.
        I'm using RewriteRules to redirect the request from the document_root to the modx folder. With this, you don't have to move your folder, but for the visitor the site seems to be in the document_root!
        Here's my .htaccess File in the document_root (Not the one in the modx folder!):
        RewriteEngine On
        RewriteRule ^manager$ /modx/manager/ [R=301,L]
        RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [OR]
        RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$
        RewriteCond %{REQUEST_URI} !^/modx/
        RewriteRule (.*) /modx/$1


        Your site should work.

        If you want to move, I suggest to read the following. You have to do all the steps except the export/import of the database-tables, as your DB is already on the same server.
        http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server
          • 38425
          • 22 Posts
          Wanze,

          Thanks for your replies Frogabog and Wanze!!

          So, Wanze, if I used your method, does anything else besides .htaccess file go in the domain root?

          For example, where is the index.php located?

          Thanks. -Dwayne

            • 31946
            • 116 Posts
            hi dwayne,
            no, you can leave all the modx stuff inside the "modx" folder.
            the htaccess in the document root is just "forwarding" any request to modx.
            you need to have mod_rewrite installed for apache, but when you're using FURLS,
            this is a condition anyway.

            Cheers