We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    I’m in the process of moving a large site from a filesystem-based setup to MODx Revolution. My initial gameplan for converting a given directory of web pages was as follows: remove the old ’foo’ directory entirely, and set up .htaccess to route all requests for foo* to MODx. This method requires setting up a new directory outside of ’foo’ for things like images, PDF files, and other binary files etc. So I’d been setting up a new directory called /assets/foo, with subdirectories like /images, /docs, and so on.

    This works, but involves a lot of work setting up and planning the new directory structure and moving the files in to it. (That may not be an entirely bad thing; it forces users to do an inventory/audit of their content and hopefully clean up a bit).

    I’m wondering now,though, whether it might make more sense to leave the /foo directory intact, and just use a little more finesse in the .htaccess statement, so that only .htm(l) requests and directory requests (that end with a ’/’) get handled by MODx, and requests for other files pass through and are served as normal.

    I’d be curious as to whether anyone has any thoughts or experience with this, or ideas about best practice.
      • 6228
      • 249 Posts
      I would opt for the second option, that is, leaving /foo intact with redirects. You will have fewer 404 issues with search engines and users’ previously bookmarked pages.

      The only con is that additional .htaccess rules are extra processing overhead, but that’s a trivial issue with a site that isn’t massively trafficked.
        lo9on.com

        MODx Evolution/Revolution | Remote Desktop Training | Development