We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16892
    • 107 Posts
    I want to install MODx to a site that already exists, e.g. already has an index.php in the root directory.

    I know I don’t have to upload the root index.php that’s included in the upload, but how do I stop the install software from overwriting the active index file?

    Thanks.
      • 32241
      • 1,495 Posts
      Can you create a sub folder and install modx on that folder, instead of on the root folder? I don’t think it’s a good idea to play with index.php, because that’s the main point where all redirection being made.

      I never try this, but try to modify your current index.php into something else, and put modx index.php in there. Run the installation procesdure, and when you’re done, rename index.php from modx to home.php, and put back your index.php.

      Now you need to work on the .htaccess, if you’re planning to use friendly alias. Modify inde.php inside the htacess to home.php.

      I warn you that this is not guarantee to work, and I don’t think it’s a good idea to do. It’s better to run modx on subfolder.

      Regards,
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 6726
        • 7,075 Posts
        Edit : I had written this while wendy was posting... I think it’s better to first make a local install then once you have ported your old website to export your db, make a new install on your hosting service and then restore the db and local files.


        Is your site powered by a content management system, or some kind of script ? Or do your pages contain php scripts ?

        MODx can import static websites but it seems this is not your case, thus if you consider using MODx to run your website, you’ll have to import the current templates, stylesheets into MODx.

        One way to do it smoothly is install MODx on a local server (using something like XAAMP is the easiest way), then import the html structure of pages and turn them into templates, place css files in the assets/templates directory and start the adapting process.

        If you run some kind of php script, you either will have to turn those into snippets, or check if MODx doesn’t have a snippet, plugin or module that could fit your needs.

        Hope it helps smiley
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 16892
          • 107 Posts
          So then I’d have to use mod_rewrite for calls to the root domain, correct?
            • 16892
            • 107 Posts
            This will be a brand new installation with no attempt to import the current site.

            I want the authors to work on the content while I finish the template and other config. In the meantime, I want the current site to be running.

            I want MODx to run from the root. So, like I said in the other message, if I install to a subdir off the root dir, will I have to use mod_rewrite to direct calls to domain.com/modx to domain.com/?

            Quote from: davidm at Jan 12, 2006, 09:30 PM

            Edit : I had written this while wendy was posting... I think it’s better to first make a local install then once you have ported your old website to export your db, make a new install on your hosting service and then restore the db and local files.


            Is your site powered by a content management system, or some kind of script ? Or do your pages contain php scripts ?

            MODx can import static websites but it seems this is not your case, thus if you consider using MODx to run your website, you’ll have to import the current templates, stylesheets into MODx.

            One way to do it smoothly is install MODx on a local server (using something like XAAMP is the easiest way), then import the html structure of pages and turn them into templates, place css files in the assets/templates directory and start the adapting process.

            If you run some kind of php script, you either will have to turn those into snippets, or check if MODx doesn’t have a snippet, plugin or module that could fit your needs.

            Hope it helps smiley
              • 6726
              • 7,075 Posts
              Uh, OK then yes you’ll just have to rename ht.access into .htaccess and edit it according to the instructions :

              If your MODx installation is in a subdirectory, change the following line to match the physical path to the "root" of the site as follows:
              RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]

              Edit : Sorry, it seems I misunderstood what you were saying, went a little too fast here. You’re not trying to run MODx in a subdir, but to install it in a subdir and run it as if from the root ? Well, I don’t know how to do that. But I am not a rewrite rules guys, might be possible but even if you manage that got to be careful with possible url conflicts...
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 16892
                • 107 Posts
                Actually, I think your earlier response is fine.

                Ideally, I want it in the root dir (www). But, if I have to run it in a sub dir off of root (www/modx) in order to keep my current site running and have the authors work in modx at the same time, the directions in the .htaccess file resolve the problem--I think.



                Quote from: davidm at Jan 12, 2006, 10:08 PM

                Uh, OK then yes you’ll just have to rename ht.access into .htaccess and edit it according to the instructions :

                If your MODx installation is in a subdirectory, change the following line to match the physical path to the "root" of the site as follows:
                RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]

                Edit : Sorry, it seems I misunderstood what you were saying, went a little too fast here. You’re not trying to run MODx in a subdir, but to install it in a subdir and run it as if from the root ? Well, I don’t know how to do that. But I am not a rewrite rules guys, might be possible but even if you manage that got to be careful with possible url conflicts...