Hello all,
I'm running a revo 2.2 install with multiple sites. For convenience, I'd like to use modx articles as a blog on my site, but only from directory /blog. I do not want to port my static site over to modx. Is this possible? I've been trying to wrap my head around this with htaccess and other config but so far no luck.
Thanks.
-
☆ A M B ☆
- 1,780 Posts
In .htaccess for the subdirectory MODX install, use:
rewrite base /subdirectory
Quote from: atmosphere at Feb 18, 2014, 12:10 PMThat easy huh? It's never that easy 
So let me clarify. Modx is running multiple sites (cpanel install on a subdomain i.e. modx.domain.com) and is in modx/ folder, with all site assets in their corresponding folder.
All my addon domains point to the modx/ directory. Using a static site (that I do NOT want in modx) I'd have to point it to a directory within i.e. modx/static_site/
So I don't think that would work.
you don't think that it would work or doesn't it work?
I think, it should work.
-
☆ A M B ☆
- 1,780 Posts
I don't get the modx/subfolder part. Why is MODX installed at the root if you're trying to run MODX installations in subfolders?
If you've got MODX installed in subfolders and not in the root, then you need the rewrite base in the .htaccess as shown above. If you're running MODX in the root plus in a subfolder, then you will still need the rewrite base in .htaccess.
FWIW, you could easily run your static html files in MODX with static resources. Heck, you wouldn't even have to move them out of the root folder once MODX is installed as long as your resource aliases aren't the same as the static files. Then, exactly as you wish it to appear in the url, make a resource container with the "directory name" you want, add an articles container, name it "blog", and blog away.
I will try to explain the situation better.
I have modx installed on a subdomain (modx.site.com). In cpanel, when you create a subdomain it creates a folder for that subdomain. I have modx using a context switch plugin to manage multiple sites. And within the modx directory, I have folders that contain the assets (images, css, js) for each of the websites to keep everything organized.
When adding a site to modx, the addon domain document root must point to the modx directory. In order to get the site to work as normal and stay organized, I pointed it instead to the corresponding directory within modx folder -- public_html/modx/website.com
What I ultimately wanted to do was have the site function as normal without adding anything within modx other than a resource container and articles container to run a blog.
I forgot all about static resources, so I'm going to go that route for now.
If what I'm asking is possible or anyone can figure this out let us know. Thank you!