We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    If it’s a static html-site, with an index.html or index.htm, it’s quite easy actually.

    This is the way I work in this case: first, of course, I check if there are no files or folders that conflict with the modx structure and I make a backup of the site.

    I then just upload the modx install files and add this line to the .htaccess file:

    DirectoryIndex index.htm index.html index.php


    This way index.php will only be called if there’s no index.htm and no index.html.

    I allways use friendly aliases, so I name the alias of the homepage in modx something like ’test’. To test your modx site, you can call it with www.example.com/test.html.

    When your’e finished, you can bring your new site online within seconds. Just rename your alias ’test’ to ’index’ and rename index.html to index.old, and your new site is running smiley

    After a few days or weeks, you can clean up and delete all the old files.
      • 23571
      • 223 Posts
      Just sharing one of the ways that we approach this issue:

      We run multiple, shared Plesk VPS’s. We set up the domain on a new VPS (www.olddomain.com) and then create a domain alias (alias.otherdomain.com). During the build you can access the site through alias.otherdomain.com (you can’t run it with friendly URLs until you launch the site). Once the site is built you just point the DNS to the new server/site which is actually sitting on the identical URL, turn on the friendly URLs and activate the ht.access file.
        • 36805
        • 354 Posts
        Quote from: hotdiggity at May 30, 2009, 10:29 PM

        I created a snippet called RestrictAccess and added it to the top of all the templates, uncached:
        [...]
        This post is old but thanks so much for this! I prefer developing online to show progress or post a question w/ link. Also it saves time moving database and files.

        I usually just prioritize index.html by .htaccess. This time I’m on an IIS without rewrite and it prioritizes .php so I used your snippet, adjusted it to redirect to an index.html. If anyone is interested use hotdiggety’s snippet & change:
        $modx->sendUnauthorizedPage();
        to
        $modx->sendRedirect('http://www.yourdomain.com/index.html', 0, 'REDIRECT_HEADER', 'HTTP/1.1 301 Moved Permanently'); // Replace www.yourdomain.com with .. you guessed it : your domain :)
          • 12379
          • 460 Posts
          Nice one!
            Mostly harmless.