We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39498
    • 169 Posts
    I try to force the manager login on an ssl-proxy with this .htaccesss

    RewriteEngine On
    #RewriteCond falls normaler Webport
    RewriteCond %{SERVER_PORT} 80
    #...und die Anfrage nicht von der Domain des Proxy kommt
    RewriteCond %{HTTP:X-FORWARDED-SERVER} !^ssl-account\.com$ [NC]
    #leite weiter auf den Proxy
    RewriteRule ^(.*)$ https://ssl-account.com/%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


    if I point to mydomain.de/manager I get redirected - but not the ressources like images and styles. How to get those too? [ed. note: spica8 last edited this post 13 years, 2 months ago.]
      • 39498
      • 169 Posts
      So I think it has to do with the path notation of resources in all manager pages, eg. %{HTTP_HOST}%
      <script src="/manager/assets/ext3/adapter/ext/ext-base.js" type="text/javascript"></script>
      

      The rewrite rule misses out the {HTTP_HOST} for that. Adding
      <base href="http://mydomain.com" />
      for testing in the logintemplate everything gets loaded. But there are to many partials in the default templates, it does not make sense trying to put everywhere a base tag.

      Is there no easy way to load all scripts, images and styles with absolute path?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
          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
          • 39498
          • 169 Posts
          havent seen it. does it work with proxys?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Don't know, just thought I'd mention its existence. Haven't tried it.
              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
              • 39498
              • 169 Posts
              checked it out this morning and realized: I already have had a test on it. It just switches the protocoll to https. What I need is a rewrite to get all connections over the ssl-proxy.
              Therefor it would be necessary to set all paths in the manager to absolute ones. Or find a proper rewrite rule, that catches also all relative paths. For both possibilitys I did not find a solution yet.
                • 39498
                • 169 Posts
                Now I think, it has nothing to do with the rewrite, but with the way revo handles the links. In the login mask html the missing files are linked like this
                <link href="/manager/templates/default/css/index.css" type="text/css" rel="stylesheet"></link>

                (I already wonder, why the uri starts one level above the manager folder???)
                When I call the login with an ssl-proxy, the console gives this
                https://ssl-account.com/manager/templates/default/css/index.css

                as not found

                but
                <script type="text/javascript" src="assets/ext3/adapter/ext/ext-base.js"></script>

                is listet correct
                https://ssl-account.com/mydomain.tld/manager/assets/ext3/adapter/ext/ext-base.js


                so, whats going on here and why is modx handling the paths so weiredly
                can not imagine, that noone else tried to use an ssl proxy.
                  • 39498
                  • 169 Posts
                  does no one has a solution for that?
                  It's a security concern.