We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29646
    • 17 Posts
    Howdy all,

    I’m developing a modx site that (while in development) is a subdomain of another modx site (newsite.mysite.com). I have someone writing a custom db application for this new site and I moved his stuff into a folder in the root of the subdomain before installing modx. Now, when I try to hit the index.php in the contractor’s folder, I get the "page not found" behavior (defaulting to page id=1, in this case). What do I need to do to allow my contractor’s custom code in this subfolder to get parsed?

    Thanks!

    -aj
      ---
      A.J. Van Beest
      Beest Built Websites, LLC
      (877) 292-3378
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: theaj42 at Jun 18, 2009, 03:21 PM

      I’m developing a modx site that (while in development) is a subdomain of another modx site (newsite.mysite.com). I have someone writing a custom db application for this new site and I moved his stuff into a folder in the root of the subdomain before installing modx. Now, when I try to hit the index.php in the contractor’s folder, I get the "page not found" behavior (defaulting to page id=1, in this case). What do I need to do to allow my contractor’s custom code in this subfolder to get parsed?
      I assume you are using the Friendly URL capability and the associated mod_rewrite rules (in .htaccess). You need to write a mod_rewrite condition that will exclude calls to the folder for the custom app, e.g.
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !^customapp [NC]
      RewriteRule ^(.*)$ /revolution/index.php?q=$1 [L,QSA]
      

      or something like that. You might refer to mod_rewrite documentation on exactly how to write the exception for the customapp directory.