We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26016
    • 561 Posts
    Hi,
    I used Shawn’s helpful instructions for setting up multisite in Revo. I’ve used 2 methods successfully, one by editing index.php to have the other context, and also by the even handier gateway plugin method. Simply awesome, and works fine.

    But I finally reached a little problem when I tried using FURL’s on my new context. This is my test system, and I have Revo installed in a subfolder of my site. To test multisite, I made a subdomain in CPanel, and instead of using the usual matching folder that it gives you, I had it point to the same folder as my Revo installation.

    The FURL’s work great on the main site, but on the new subdomain site I’m now getting "500 internal server error" on any FURL links.

    Yes, I already cleared my site cache. Both sites are using the same template, and sharing the same .htaccess, which uses the same folder for the rewrite Base setting.

    Anybody have any ideas? Maybe I need to do further setup on my subdomain at the server level or something?
    Thanks very much,
    Dave
      MODx and Wordpress development
      Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
      • 22019
      • 390 Posts
      Not sure I quite understand correctly but it sounds like you have two domains pointing at the same folder/structure?

      Have you set the base_url and site_url settings for the context? From RTFM, these are the four settings required to get contexts working properly:
      * site_start - Set this to the ID of your "Dev Home" resource.
      * base_url - Set this to "/" (no quotes) since we’re making the root of the URL our base.
      * http_host - Set this to "dev.modxcms.com" (or your subdomain name)
      * site_url - Set this to "http://dev.modxcms.com/" (or your subdomain url). Don’t forget the trailing slash. Remember this setting is (scheme+http_host+base_url).
        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 26016
        • 561 Posts
        Quote from: odeclas at Dec 21, 2010, 04:13 PM

        Not sure I quite understand correctly but it sounds like you have two domains pointing at the same folder/structure?

        Have you set the base_url and site_url settings for the context? From RTFM, these are the four settings required to get contexts working properly:
        * site_start - Set this to the ID of your "Dev Home" resource.
        * base_url - Set this to "/" (no quotes) since we’re making the root of the URL our base.
        * http_host - Set this to "dev.modxcms.com" (or your subdomain name)
        * site_url - Set this to "http://dev.modxcms.com/" (or your subdomain url). Don’t forget the trailing slash. Remember this setting is (scheme+http_host+base_url).

        Hi,
        Thanks for that helpful info. You assumed correctly, they do point to the same folder/structure, and work great as long as no FURL’s. I had exactly what you have above except for the trailing slash on site_url, which I thought sounded good, but I got the same error when I did that.

        Anybody else have a thought?

        Thanks, Samba
          MODx and Wordpress development
          Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
          • 33337
          • 3,975 Posts
          What is ur htaccess file look like?
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 3749
            • 24,544 Posts
            Do you have this in all your templates (be sure it’s uncached):

            <base href="[[!++site_url]]" />
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 26016
              • 561 Posts
              Hello Bob!
              Quote from: BobRay at Jan 02, 2011, 10:51 PM

              Do you have this in all your templates (be sure it’s uncached):

              <base href="[[!++site_url]]" />


              Yes, I did try already try that. No luck! :-(

              Even with it uncached, the Base looked OK during each test. Thanks very much anyway!

              Hi Zi,
              My .htaccess is just what I typically use for FURL’s on the same server... the only change I make is to change the rewrite base folder, because my test Revo is in a subfolder.

              It occurred to me that maybe for what I’d doing, I’ll need to write special code for the subdomain. I’m not the best mod-rewrite programmer, but I can get by.

              The way I set up my subdomain was to use CPanel, and instead of CPanel’s usual creation of a folder with the name of the subdomain, I had it point to the same subfolder as my Revo. Maybe this borks something? But this is a little beyond my server knowledge. And also above my pay grade: maybe a normal domain pointing there (as opposed to a subdomain) will work OK.

              There’s yet another way of setting up Multisite besides the plugin method and the edited index.php method: using a separate folder for each domain config. I was hoping not to do that, but I may give it a try. Or I may just bite the bullet and try a real domain instead of a subdomain.

              Thanks to you both. Weird, isn’t it? It would even feel better if someone simply said that they had done multisite with Revo and all FURL’s work on a normal Unix hosting account. smiley Somebody must have figured this out somewhere!
                MODx and Wordpress development
                Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
                • 3749
                • 24,544 Posts
                TBH, I haven’t tried it except as a quick test. I don’t remember if I tested FURLs or not. Does the subsite have its own index.php file and/or its own .htaccess? I’m not sure if that’s appropriate or not if you’re using the plugin method.

                Also, have you tried setting the rewrite base to just / ? If the plugin is doing the redirection, I’m not sure you want .htaccess redirecting also, but again, I’m no expert on this.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 26016
                  • 561 Posts
                  Quote from: BobRay at Jan 03, 2011, 05:12 PM

                  TBH, I haven’t tried it except as a quick test. I don’t remember if I tested FURLs or not. Does the subsite have its own index.php file and/or its own .htaccess? I’m not sure if that’s appropriate or not if you’re using the plugin method.

                  Also, have you tried setting the rewrite base to just / ? If the plugin is doing the redirection, I’m not sure you want .htaccess redirecting also, but again, I’m no expert on this.
                  Hey Bob,
                  Following your idea, I got it!!! I set the rewrite base to just /, and that did it, suddenly my extra site’s FURL’s worked!!

                  Interestingly, that borked the FURL’s on my main Revo test site, whose format is similar to "mysite.com/revo/". So that tells me that if someone is working in the root of their site like you normally would, it’s likely that the whole thing would work without incident. And if someone wanted to have a set-up just like mine, they would just have to write a bit more .htaccess code to select the rewrite base according to the URL coming in.

                  It’s interesting to me that because the subfolder is the root of the extra domain, the single slash is all that’s needed, not the subfolder. I’m guessing a server geek would probably say, well, duh. smiley

                  I used the plugin method for switching contexts... this is most appealing to me, as things are very centralized, and when I do an upgrade of MODx, no danger of borking any special root index.php, and also no extra subfolders and configs needed.

                  Wow, man, as usual, you are the Revo support rock star!

                  Thanks a million,
                  Dave

                  PS: now I would say that the next handy Revo feature would be the ability to duplicate contexts - hand-coding each one is tedious. This would make managing multisite really fast and easy!
                    MODx and Wordpress development
                    Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
                    • 33337
                    • 3,975 Posts
                    If your main domain points to

                    site/root

                    and you have installation in

                    site/root/revo

                    You will access it like

                    site.com/revo/

                    So you should point your other domain/subdomain to

                    site/root

                    Then access the site as

                    sub.domain/revo/

                    In theory, it should work fine. and I assume that currently your sub.domain’s root is

                    site/root/revo/

                    Let me know if makes sense to you. smiley
                      Zaigham R - MODX Professional | Skype | Email | Twitter

                      Digging the interwebs for #MODX gems and bringing it to you. modx.link
                      • 3749
                      • 24,544 Posts
                      zi, I don’t know about samba, but domain pointing *never* makes sense to me. tongue

                      It always seems wrong to me to have a rewrite base of / for a site in a subdomain. Obviously, it works, but i can never figure out when it is and isn’t appropriate. wink
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting