We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7690
    • 166 Posts
    I want to test a site on the live server, but without setting the current website offline.
    So i changed the index.php from modx to index2.php
    But how can i get the site work with index2.php. When I navigate through the site, it still uses index.php.
      • 3749
      • 24,544 Posts
      In .htaccess:

      DirectoryIndex index2.php


      You’ll also have to change the rewrite rule if using FURLs.

      I’m not sure what other side effects there might be but it shouldn’t hurt to try it.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 7690
        • 166 Posts
        hhmm...it doesn’t seems to work.
        in my htacces:

        RewriteEngine On
        RewriteBase /
        DirectoryIndex index2.php

        my FURLS are off. But the menu links still don’t change and don’t work when you click on them. It still goes to index.php?id=x
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          That’s because when the parser generates links, it generates them as index.php?id=...
            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
            • 3749
            • 24,544 Posts
            How about going the other way?

            Use index.html for the original site and let MODx use index.php.

            DirectoryIndex index.html


            If the original index.html file contains php code, you’ll have to add a handler to make it work.

            They shouldn’t interfere with each other that way.

              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 7690
              • 166 Posts
              hhmm...still dunno how to fix it. But the website has been launched, so my problem is solved for now :p
                • 29525
                • 388 Posts

                Use index.html for the original site and let MODx use index.php.

                I just installed modx in the root directory where there is an existing site running.

                siteurl/index.html = the current site
                siteurl/index.php = modx site

                siteurl/ = modx site (no extension)

                The modx site isn’t yet ready so I want the url with no extension to bring up the current site.

                What am I missing?

                Thank you!
                  www.terrybarthdesign.com
                  • 5340
                  • 1,624 Posts
                  Probably your server is configured to load the php file first. If no php file then it loads the html file.

                  You can configure this from your web server. If not you could try changing the htaccess file. Maybe somebody else can give you more info.

                  I’m no expert in changing the htaccess file
                    • 1343 ☆ A M B ☆
                    • 2,213 Posts
                    This should work:

                    DirectoryIndex filename.htm

                    Change the name to the desire index page and add to your htaccess.

                    AMDbuilder
                      Patrick | Server Wrangler
                      About Me: Website | Tweets |  MODX Hosting
                      • 29525
                      • 388 Posts
                      Well after a bunch of trials and errors, I’ve got something workable for this.

                      I added the DirectoryIndex index.html to the .htaccess file but got a 500 internal server error. so I recreated and tested the .htaccess file one line at a time and finally included the directoryindex line and now no longer receive the 500 error. Must have been something in the original file that wasn’t right.

                      So now the default for the site is index.html. So far so good.

                      Then when I tried to access the modx manager I received a page not found unless I added index.php to the url. Guess that makes sense.

                      This was really just trial and error so , if anyone see anything wrong with this let me know.

                      Thanks for your help!
                        www.terrybarthdesign.com