We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16343
    • 14 Posts
    Hi.

    Im using modx for a small website, I noticed that the use a "/" is not allowed in the alias. Is there any way this can be changed in the settings?

    I’ve not been able to locate this yet.

    Regards
    Kristian
      Regards

      Kristian Nissen
      • 32241
      • 1,495 Posts
      Is there any reason why you need / as part of the alias?
      One of the reason that / is prohibited, because it’s part of the separator between folder, subfolder and child document.
      I never try using this as an alias, but I can assure you that it won’t work.

      Another workaround for this, you can turn on Search Engine Friendly Path and put your document inside the right folder, until you achive the right alias that you’re wanting.
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 16343
        • 14 Posts
        Hi, thanks for the reply.

        It would be helpful to use the "/" as part of the site structure to build a better heiracy like this:
        domain.com/seo/linkfaming.php and domain.com/seo/doorwaypages.php instead of domain.com/seo_linkfarming.php which is not quite as nice as a structure.

        Using an ErrorDocument in .htaccess you can do this and then get a hold of the requested document using one of the predefined variables in PHP (I experimented with this some time ago, I dont remember the name of the variable)

        In terms of seo it would work wonders.

        Regards

        Kristian
          Regards

          Kristian Nissen
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: kristian at Mar 23, 2006, 02:54 AM

          It would be helpful to use the "/" as part of the site structure to build a better heiracy like this:
          domain.com/seo/linkfaming.php and domain.com/seo/doorwaypages.php instead of domain.com/seo_linkfarming.php which is not quite as nice as a structure.
          ...

          In terms of seo it would work wonders.

          This is what the "Use friendly alias path:" option is for; under Administration --> System configuration --> Friendly URL settings. Folders alias’ containing other MODx documents will represent the virtual directories of the structure. So you could create a folder with alias seo containing documents with the alias linkfaming and/or doorwaypages.

          NOTE: Be sure to include a
          <base href=[(site_url)] />
          in your template( s ) HEAD tag if turning on the "Use friendly alias path option".
            • 29988
            • 89 Posts
            I really vote for custom nice url.

            As my expirience says, really great site can’t be limited to use either www.domain.com/alias or www.domain.com/full/path/to/document. It must be much more flexible, in extreme situation the URLs should be independent on the tree structure. For example, I want the articles to be organized in the cathegory tree (per topic), but I also want them to have URLs like www.domain.com/articles/title-of-article
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: tillda at Mar 23, 2006, 05:15 PM

              I really vote for custom nice url.

              As my expirience says, really great site can’t be limited to use either www.domain.com/alias or www.domain.com/full/path/to/document. It must be much more flexible, in extreme situation the URLs should be independent on the tree structure. For example, I want the articles to be organized in the cathegory tree (per topic), but I also want them to have URLs like www.domain.com/articles/title-of-article

              Actually, the organization of the documents in the site tree is for determining your URLs, organized by some permanent, but simple structure (i.e. PermaLinks); this can be hierarchical or not in MODx via the use_alias_paths option. Also, providing other means of accessing these permanent resources is trivial in MODx; for instance if you wanted to tag an article in many categories and access the same article from each, you might want to be able access it via /articles/category/title-of-article, while in the actual site tree it might be organized as /articles/2006/03/title-of-article or similar. These alternate means can be achieved any number of ways in MODx; by creating an alternate tree under an unpublished folder (or just one hidden from the menus) with child Weblink documents organized for this alternate access scheme, or by creating a single page to represent each category, and using a snippet to redirect to appropriate articles; things most sites couldn’t even dream of doing without building a framework like MODx first.

              In the future, we will probably also allow paths to be defined inside of an alias as well, to further increase the flexibility of determining the permanent URLs without having to come up with crazy hidden tree structures in the manager.
              wink
                • 16343
                • 14 Posts
                I’m glad to see that I’m not the only one who likes a good and solid structure for my site, I like the fact that I can create alias this easy, but as your site grows a folder based structure is the best way to go, also if your not focusing on SEO.

                I’ll experiment with the solution Jason Coward suggests.
                  Regards

                  Kristian Nissen