We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17895
    • 209 Posts
    Hi there,
    1) the configuration setting "Automatically generate aliases" should be Yes/No, instead of "Textfield".
    2) if I have a resource whose alias is "test", the web address http://www.mysite.com/?q=test does not work (it redirects to the first page; http://www.mysite/?q=4 works, as expected, since the page id is 4).
      Daniele "MadMage" Calisi
      • 28215
      • 4,149 Posts
      Quote from: madmage at Jan 07, 2010, 10:45 AM

      1) the configuration setting "Automatically generate aliases" should be Yes/No, instead of "Textfield".
      Please file this here: http://bugs.modxcms.com/


      2) if I have a resource whose alias is "test", the web address http://www.mysite.com/?q=test does not work (it redirects to the first page; http://www.mysite/?q=4 works, as expected, since the page id is 4).
      That’s expected behaviour; do: http://www.mysite.com/test.html
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 17895
        • 209 Posts
        Quote from: splittingred at Jan 07, 2010, 10:50 AM

        Quote from: madmage at Jan 07, 2010, 10:45 AM

        1) the configuration setting "Automatically generate aliases" should be Yes/No, instead of "Textfield".
        Please file this here: http://bugs.modxcms.com/
        Ok

        Quote from: splittingred at Jan 07, 2010, 10:50 AM

        Quote from: madmage at Jan 07, 2010, 10:45 AM

        2) if I have a resource whose alias is "test", the web address http://www.mysite.com/?q=test does not work (it redirects to the first page; http://www.mysite/?q=4 works, as expected, since the page id is 4).
        That’s expected behaviour; do: http://www.mysite.com/test.html

        Thanks man! You are a very quick responder!

        However, is there any tutorial about how to manage containers with friendly URLs? It seems not to be considered (or optional) in the q= part of the url, but a link to a container makes something wrong with the final slash (going in one "directory" does not display the content of that page, and going in one directory and then another, append the second directory to the first)
          Daniele "MadMage" Calisi
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: madmage at Jan 07, 2010, 11:34 AM

          However, is there any tutorial about how to manage containers with friendly URLs? It seems not to be considered (or optional) in the q= part of the url, but a link to a container makes something wrong with the final slash (going in one "directory" does not display the content of that page, and going in one directory and then another, append the second directory to the first)
          Containers are suffixed with the setting container_suffix, which is by default "/". So if your Resource alias is test and it’s marked as a container, the URI will be test/ or index.php?q=test/. If it’s not marked as a container, the URI would be test.html or index.php?q=test.html.

          Also, as has always been the case with MODx, you need to use a base tag in your template HEAD since all requests handled by MODx are handled from the root (i.e. all generated URLs are relative to the site_url), regardless of the virtual sub-directory you are accessing.
          <base href="[[!++site_url]]" />
            • 17895
            • 209 Posts
            Quote from: OpenGeek at Jan 07, 2010, 02:47 PM

            Quote from: madmage at Jan 07, 2010, 11:34 AM

            However, is there any tutorial about how to manage containers with friendly URLs? It seems not to be considered (or optional) in the q= part of the url, but a link to a container makes something wrong with the final slash (going in one "directory" does not display the content of that page, and going in one directory and then another, append the second directory to the first)
            Containers are suffixed with the setting container_suffix, which is by default "/". So if your Resource alias is test and it’s marked as a container, the URI will be test/ or index.php?q=test/. If it’s not marked as a container, the URI would be test.html or index.php?q=test.html.

            Also, as has always been the case with MODx, you need to use a base tag in your template HEAD since all requests handled by MODx are handled from the root (i.e. all generated URLs are relative to the site_url), regardless of the virtual sub-directory you are accessing.
            <base href="[[!++site_url]] />


            Ach! That was the case: I was using a self-made template without the base href... it’s good that there is now the Andreas template for Revo in the repository: I found another couple of things I forgot (e.g., the charset declaration, etc.). Now everything works!
              Daniele "MadMage" Calisi