We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24017
    • 88 Posts
    Hi,
    I am migrating my site to the live server which already contains a website. I have put all the folders in server root folder to avoid having to change the paths later. I only have a pb with the inex.php file , and would like to know if we can setup modx run an alternate index file. By that I mean can i rename the index file and change something so that all requests are routed viea newindex.php ? Hope that was clear enough ! many thansk in advance
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      As long as you're using Friendly URLs, you should be able to rename the index.php file and edit the .htaccess file to use newindex.php instead of index.php in the rewrite rules
      # For Friendly URLs
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ newindex.php?q=$1 [L,QSA]
      

      However, I don't think this will be any help for running it alongside your existing site, as it will be trying to serve every page requested through MODx. You really need to have either your MODx installation in a subfolder, or move the existing site into a subfolder.

      If you don't use friendly URLs, then MODx must have index.php, as that's what it uses internally to generate URLs. [ed. note: sottwell last edited this post 14 years, 5 months ago.]
        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
        • 24017
        • 88 Posts
        thank you!