We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1611
    • 591 Posts
    To get this mod work with Direct Resize 0.9 Friendly URLs
    You must add an exception to regexp like this:
    ###<br /># First be sure to rewrite the request to a unique domain<br />RewriteCond %{HTTP_HOST} .<br />RewriteCond %{HTTP_HOST} ^en\.test [NC]<br />RewriteCond %{HTTP_HOST} !^www\.en\.test [NC]<br />RewriteRule (.*) http://www.en.test/$1 [R=301,L]<br /><br /># rewrite the homepage of each domain to index.html<br />RewriteRule ^rubin-en\.html$ /index.html<br /><br /># do the other magic: Rewrite the the requests to for MODx readable folders<br />RewriteCond %{HTTP_HOST} en\.test [NC]<br />RewriteCond %{REQUEST_URI} !^/manager<br />[b]RewriteCond %{REQUEST_URI} !^/images[/b]<br />RewriteCond %{REQUEST_FILENAME} index\.php [OR]<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteRule ^(index\.(html?|php)|rubin-en)?(.*)$ index.php?q=/rubin-en/$3 [L,QSA]<br />

    So, just add this bold line, or even more strict line (I’ve got it from DR .htaccess)
    RewriteCond %{REQUEST_URI} !^[b][color=red]/[/color][/b]images/([a-z0-9]{32})/.*\.(png|gif|jpe{0,1}g)$

    Please pay attention to red slash.
      • 1611
      • 591 Posts
      Hi!
      Does anyone tested this with 3 domains?
      I don’t know why, but I can’t get it work for 3rd domain. First and second (same config) are work nicely.
        • 17883
        • 1,039 Posts
        For me it works with 6 domains without problems. Do you have a problem with directResize or a general one? Could you provide some code?
          • 1611
          • 591 Posts
          DirectResize works fine with edits I suggested. Use that solution.

          Here was long post about my settings

          Thanks for answer — it helps me. I locate the problem. It was in Apache config.
            • 1611
            • 591 Posts
            Ok. So status:
            All solutions from tutorial are work and work nice.

            Problems to solve:
            1. Cross-domains links via [~id~]
            2. How to get work QuickEditor on all domains. (My content manager really likes it smiley ) Partially solved, see next message.
              • 1611
              • 591 Posts
              Ok. I found the solution to poit #2 — To get QuickEdit work on second domain, you simply should login manager from this domain.
              e.g.:
              You have 2 domains site.com and home.net
              so to manage both domains with QE you should login twice from site.com/manager and home.net/manager.

              Really, I didn’t know that. It’s cool.

              I think access management solution based on url wich user used to login may be found. (If you have different content managers for different domains as me)
                • 11954
                • 58 Posts
                Hi, does this also work with subdomains? What changes would I need to make to the .htaccess for subdomains rather than seperate domains?
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Quote from: heimdall at May 26, 2009, 05:28 PM

                  Hi, does this also work with subdomains? What changes would I need to make to the .htaccess for subdomains rather than seperate domains?
                  The situation is the same.  The issue is that session cookies in PHP are configured for specific domains or for the requested domain (if not specified).  By default, whatever is in your php.ini will determine what these session cookies will use for the domain, and typically this is blank (i.e. use domain requested by client).  To support all subdomains with one session, you can set the value of session.cookie_domain to .domain.tld -- this effectively means you will use the same session for any subdomain of domain.tld, including no subdomain and www.  You can set this in your php.ini or, if your on shared hosting and your host allows it, in the .htaccess file via php_value.
                    • 1611
                    • 591 Posts
                    @OpenGeek
                    ok. Does this directive allows to specify multiple domains? (To solve QuickEditor issue above)
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Quote from: Andrey at May 26, 2009, 09:14 PM

                      @OpenGeek
                      ok. Does this directive allows to specify multiple domains? (To solve QuickEditor issue above)
                      I don’t believe so, just for subdomains.