We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32241
    • 1,495 Posts
    Right now I’m using mod rewrite to remove the first sub folder from the root as a container for one site. So if you found another way to do it, please give let us know.

    Have fun with your first MODx experience...

    Sincerely,
    Wendy Novianto
      Wendy Novianto
      [font=Verdana]PT DJAMOER Technology Media
      [font=Verdana]Xituz Media
      • 17665
      • 54 Posts
      I know this thread is about a month old... hopefully someone is still checking it.

      Did anyone answer itsawebthing’s question? Wendy, can you post what you did with rewrite?

      If possible, I’d like to have multiple domains (not just subdomains) on one MODx install. We have a lot of churches that are part of our organization and they will all have information in our global church directory (name, pastor, meeting address, etc). We want to also provide them with template websites that they can have their own domain for.

      Example: church1
      Our MODx site would be setup with a folder in the root called "Church Websites". In that folder would be another folder called "church1". When someone loads up church1.com, I’d like it to point to this document and display in the address bar as http://church1.com/ or http://church1.com/home.html. Is this possible?

      I’m thinking the subdomains snippet might do it, I’m just not sure if would handle a whole different domain and how to "rewrite" the URL so it strips out the "/Church Websites/church1/" info.

      Thank you for your help smiley
        • 32241
        • 1,495 Posts
        I used to use mod_rewrite to handle this, but right now I’m hacking the core code to do it.

        http://modxcms.com/forums/index.php/topic,2059.0.html

        It hasn’t been approved yet by the core developer team, but if you visit the testing site, you will understand the use of it. Yes you can use this solution to host even a different domain, except, the domain with www and domain without www being appended to it will be different. Take a note on that. I use mod rewrite redirect all domain with www to the one without www.
          Wendy Novianto
          [font=Verdana]PT DJAMOER Technology Media
          [font=Verdana]Xituz Media
          • 4273
          • 356 Posts
          Quote from: xwisdom at Nov 17, 2005, 11:25 AM

          Once the plugin is installed your next step is to make subdomain.yourdomain.com an alias of www.yourdomain.com.

          how to make the subdomain.yourdomain.com an alias of www.yourdomain.com ? ?
            SMF Bookmark Mod - check it out
            http://mods.simplemachines.org/index.php?mod=350
            • 24911
            • 4 Posts
            I realize the plugin is already working, but because the last poster asked how to alias, I posted this.

            Redirect visitors and bots from a subdomain to a domain with a 301 redirect : http://pro-seo.blogspot.com/2006/06/301-permanent-redirect.html
            "How to do 301 redirection" tutorial : http://ekstreme.com/webmaster/301-redirection.php
            Followed up here : http://www.cre8asiteforums.com/forums/index.php?showtopic=29607
              • 27889
              • 415 Posts
              Hello, I’m trying to redirect a subdomain to a folder in MODx, but I don’t understand one thing, I have done a 301 redirect so the subdomain.domain.com is redirect to domain.com but after the redirect, the var $_SERVER[’HTTP_HOST’] contain domain.com and not subdomain.com, so the plugin don’t give me the file for my subdomain. I’m trying a 302 redirect (I think it don’t change the required url, but only in the adress bar of the navigator ? ) and it don’t work at all.
              When I’m trying to access subdomain.domain.com I have the mydomain.com ’s page.

              An example is welcome.
              Thanks for help.
                MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
                • 4273
                • 356 Posts
                read all that about 301 but didn’t make any sense to me, too much tech need some abc instructions he he
                  SMF Bookmark Mod - check it out
                  http://mods.simplemachines.org/index.php?mod=350
                  • 13003
                  • 18 Posts
                  Quote from: bugsmi0 at Jun 26, 2006, 05:10 PM

                  how to make the subdomain.yourdomain.com an alias of www.yourdomain.com ? ?

                  A very easy way to alias a domain (assuming your hosted account uses CPanel) is to "Park" the domain on top of your main domain.
                  That way the aliasing is handled at the DNS level. Then you can use PHP to determine which "domain" is being called, and return the virtual site appropriately.
                    • 27889
                    • 415 Posts
                    Yes I have cpanel, I don’t know domain’s park, I’m getting to try it, thank’s for the info.
                      MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
                      MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Couldn’t you also modify your .htaccess file to send the different domains being requested to a different index.php file in a different folder?
                        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