We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1828
    • 137 Posts
    I would like to have folder URLs output as "http://www.site.com/folder/" instead of "http://www.site.com/folder.html".

    I have configured these folders as docs without content except for a "[[FirstChildRedirect]]" call.

    I understand the plugin Strict SEO URLs does something along these lines; however it conflicts with other Javascript on the site in question.

    Is there any other way of achieving this behaviour?

    Thanks,
    Anton
      • 21257 MODX Staff
      • 730 Posts
      Hey Anton ;-)
      Are you trying to get the first child document to appear with the /folder/ URL in the address bar?
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 1828
        • 137 Posts
        The first child doc appears with the correct URL:

        http://www.site.com/folder/first-child.html

        I wanted the menu link for the parent folder to appear as a directory URL:

        http://www.site.com/folder/

        Instead of like this:

        http://www.site.com/folder.html

        It’s not critical, but just wondering if this is possible without using the SEO Strict URLs plugin.

        :)

        Thanks,
        Anton
          • 32646
          • 87 Posts
          If I am not misunderstanding your questions, it should be pretty easy. Go to Tools>Configuration>Friendly URLS and change "Suffix for friendly URLs:" to "/". That is what I did. Then every Doc ends in "/", not just the parent/child folders.
            Just learning the ropes.
            • 28033
            • 925 Posts
            Quote from: wordcooper at Apr 10, 2008, 01:16 PM

            If I am not misunderstanding your questions, it should be pretty easy. Go to Tools>Configuration>Friendly URLS and change "Suffix for friendly URLs:" to "/". That is what I did. Then every Doc ends in "/", not just the parent/child folders.

            Yep, I use that on my site as well.

            It stops .html/whatever from working, unless I did something wrong, though.
              My Snippets
              -> PopUpChunk v1.0
              • 1828
              • 137 Posts
              Right, of course! I can’t believe I didn’t think to try that. rolleyes smiley

              Now I’ve just got to 301 redirect the old "page.html" URLs to the new "page/" URLs...

              Thanks,
              Anton
                • 1828
                • 137 Posts
                And the final touch added to the .htaccess file prior to the FURL rewrite lines:
                # Rewrite ".../page.html" to ".../" (with a permanent redirect)
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteRule ^([^\.]+)\.html$ $1/ [R=301,L]