We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53185
    • 7 Posts
    Hello,

    I have some problem to configure my website using FURL.
    I explain myself :

    At the launch of my website, I had only my homepage.
    Lately I tried adding 2 ressources and everything seems working great.
    However, when I tried to setup FURL with Modx Revolution and click on the preview of my new ressources, I'm directed to this :
    mydomain.commynewressources.html (which lead to a not found address)

    So you can see that I miss a "/".
    I tried pretty much everything and can't figure out what's going on.

    My last hope is you smiley
    Thanks in advance for any help.
      • 4172
      • 5,888 Posts
      sounds like your base_url isn't '/' but just '' ?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 53185
        • 7 Posts
        Quote from: Bruno17 at Jan 26, 2017, 02:49 AM
        sounds like your base_url isn't '/' but just '' ?

        How can I find this settings ?

        I only found :

        rb_base_url and this setting is set to ''
          • 4172
          • 5,888 Posts
          if you haven't a context-setting for base_url MODX_BASE_URL of your config.inc.php is used
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 53185
            • 7 Posts
            First, thanks for your help.

            I checked my core/config/config.inc.php file and modx_base_url seems well configured :

            if (!defined('MODX_BASE_PATH')) {
            $modx_base_path= '/home/admin/web/mydomain.com/public_html/';
            $modx_base_url= '/';
            define('MODX_BASE_PATH', $modx_base_path);
            define('MODX_BASE_URL', $modx_base_url);
            }
              • 3749
              • 24,544 Posts
              Be sure to put this tag in the head section of all templates:

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


              Clear the site cache, then, do a "view source" in your browser and see what the result is.

              Also, what is the RewriteBase line in your .htaccess file?
                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
                • 53185
                • 7 Posts
                I found the solution :

                I missed those lines in my .htaccess :

                # The Friendly URLs part
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                  • 53185
                  • 7 Posts
                  Well it's not the complete solution as I use Babel to have multi langage website.
                  Now I can go to my new pages but I don't ahve access to english part of my website.

                  Here is the part of my .htaccess concerning friendly URL :

                  # The Friendly URLs part

                  # redirect all requests to /en/favicon.ico and /de/favicon.ico
                  # to /favicon.ico
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteRule ^(en|fr)/favicon.ico$ favicon.ico [L,QSA]

                  # redirect all requests to /en/assets* and /de/assets* to /assets*
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteRule ^(en|fr)/assets(.*)$ assets$2 [L,QSA]

                  # to index.php and set the cultureKey parameter
                  RewriteCond %{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule ^(en|fr)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
                    • 3749
                    • 24,544 Posts
                    I'm not that familiar with Babel, but here are a couple of thoughts:

                    REQUEST_FILENAME returns the full path to the file. Because of the ^ at the beginning of the RewriteRule, it will only execute if 'en' or 'de' are at the very beginning of that path. You might try removing the ^.

                    Also, the !-f !-d suffixes mean that the rules will only apply if the named file/directory doesn't exist. If the de/assets and en/assets directories and their files exist, there will be no rewrite.
                      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
                      • 53185
                      • 7 Posts
                      I tried deleting ^ but nothing changed.

                      Just so you know I followed this tutorial for my .htaccess : http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html

                      I followed every step but I had to delete those lines :

                      # detect language when requesting the root (/)
                      RewriteCond %{HTTP:Accept-Language} !^en [NC]
                      RewriteRule ^$ fr/ [R=301,L]
                      RewriteRule ^$ en/ [R=301,L]

                      Because it gets me a "not well redirected" issue.

                      Thanks for helping me ! smiley