We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15826
    • 160 Posts
    I’d like to build it out leaving the current static index.htm in place toplevel, then have the modx site go live when it’s more or less done. Is there a way to do this without .htaccess redirect?
      "I’d love to change the world but I can’t find the source code . . ."

      Custom ModX Templates
      • 18397
      • 3,250 Posts
      sorta
        • 15826
        • 160 Posts
        sorta?

        In other web aps this is relatively easy. Somehow I’m wondering if "sorta" is a hint that with modX it isn’t?
          "I’d love to change the world but I can’t find the source code . . ."

          Custom ModX Templates
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I believe you could set the site to be "unavailable", and make the "site unavailable" page be a document with your .html content. If I am correct in my understanding, admin users can still see the entire "unavailable" site.

          http://modxcms.com/doc-offline.html
            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
            • 263
            • 52 Posts
            Let me see if I have properly understood your problem. At the moment, yoursite.com/ maps to yoursite.com/index.htm, the root of ’old’ site which you want to keep live whilst you install and set-up MODx in the same location and switch over when the time is ripe. Am I on the right track? If so, you might want to add (or modify) this line to yoursite.com/.htaccess:
            DirectoryIndex index.htm index.html index.php
            , reversing the usual precedence of files the server uses to open a directory. Now make sure there are no index.php, /assets/ or /manager/ already in use! and install MODx; clear your browser cache and launch MODx with yoursite.com/index.php. One caveat: manager > site > launch site will take you to index.htm. If this is a bother, do small mod to /manager/frames/l[1,2,3,4]mnu.php (number is manager layout) replacing:
            <script language="JavaScript" type="text/javascript">
            function showWin() {
            	window.open('../');
            }
            with:
            <script language="JavaScript" type="text/javascript">
            function showWin() {
            	window.open('../index.php');
            }
            Simply change DirectoryIndex directive when you are ready - no need to be in a hurry to remove ’old’ site.
            Et voilà!
              • 18397
              • 3,250 Posts
              Sorry about being so breif, I was on my PSP and it took forever just to type that in! What I do is the following:

              Install MODx in your site root but DO NOT turn on FURLS. If you leave your index.html file there your site will continue to work as normal. Then, to work on your MODx site, just navigate over to index.php and your MODx site will work fine.
                • 15826
                • 160 Posts
                Oh, that’s easy! And then the FURLs can get turned on when the modx site goes live, I presume . . .

                Thanks, folks!
                  "I’d love to change the world but I can’t find the source code . . ."

                  Custom ModX Templates
                  • 18397
                  • 3,250 Posts
                  Yup, you just rename index.html and turn on FURLs and all is well.
                    • 7455
                    • 2,204 Posts
                    Quote from: Mark at Apr 16, 2006, 01:34 PM

                    Sorry about being so breif, I was on my PSP and it took forever just to type that in! What I do is the following:

                    Install MODx in your site root but DO NOT turn on FURLS. If you leave your index.html file there your site will continue to work as normal. Then, to work on your MODx site, just navigate over to index.php and your MODx site will work fine.

                    That depets on how your apache is setup my server looks first if there is and index.php if not it wil go for the html but aybe thats not normal?
                    Dimmy
                      follow me on twitter: @dimmy01
                      • 15826
                      • 160 Posts
                      Dimmy, if I do the .htaccess thing like Abbeyroad suggested that should handle that, if it’s needed. Then when I want to put the site live I just delete that bit. I know the server my main site is on will look for an index.php first, but I’m not sure about this one, same host but different server.
                        "I’d love to change the world but I can’t find the source code . . ."

                        Custom ModX Templates