We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8841
    • 42 Posts
    How change I change my page urls to be friendly

    e.g. index.php?id=2

    changed to this

    about.php

    Also, I’ve set up Wayfinder so that I can click on all the top menu items and take me straight to the page

    However, when I click on ’Home’, it takes me to localhost/modx/

    instead of

    localhost/modx/index.php

    Thanks,
    Emma
      • 11325
      • 8 Posts
      Tools > Configuration > Friendly urls.

      Set the suffix to php if you want to show that.

      As to the redirect to index.php, Why would you want to? what’s wrong with redirecting to the root?

      EDIT:

      Emms, I’ve just noticed, even though I’ve been a member here a lot longer than you have, you’ve got a higher post count lol. How strange.
        --------------------
        If its not broken, I just haven't gotten to it yet.
        ------------------------------------------------------
        Capitalisation is the ONLY difference between
        "I had to help my uncle Jack off a horse.." and "I had to help my uncle jack off a horse.."
        Remember children, check your grammar carefully! smiley
        ------------------------------------------------------
        If vegetable oil is made from vegetables, and olive oil is made from olives, then wtf is baby oil made from??!

        ------------------------------------------------------
        • 3749
        • 24,544 Posts
        If you give the home page an alias of "Home" and turn friendly aliases on, it should go to localhost/modx/Home.php (if you set the suffix to "php" though I don’t see why you’d want to do that).
          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
          • 8841
          • 42 Posts
          Okay, I’ve changed urls to friendly urls, got a small problem now. 

          When I right-click and edit on a file in my tree structure on the left, e,g, about us, and click preview, this shows me exactly what I want to see, e.g. quickedit feature, manage pictures feature, but the page is still called index.php?id=2

          as opposed to

          about.php


          Anyone have any ideas?
            • 4310
            • 2,310 Posts
            I think FURL’s only work when the page is rendered in the front end via the document parser.
            From inside the Manager FURL’s don’t exist.
              • 18367
              • 834 Posts
              Emma,

              bunk is correct. The preview will show you the actual document url. Just remove the php?id=2 bit and type in the correct alias or furl, press reload and it will show up correctly.

              Also, from an SEO perspective, All links to the home page should always go to the root ie: www.mysite.com.

              If you have links going to www.mysite.com/index.php or home or anything else you are destroying your SEO effectiveness for the home page.

              Also, you might want to think about getting rid of suffix altogether for several reasons.

              It makes the page load just a little bit faster, and 2, if you ever change from php to aspx or html, it won’t obliterate all the search engine rankings you’ve spent years building.

              Plus a url of www.mysite.com/home is a lot easier to remember in any marketing campaigns you may run,

                Content Creator and Copywriter
                • 8841
                • 42 Posts
                Okay, when Im not in the manager and I click on the menu items, e.g. about, it opens about.php, but the quick edit feature doesn’t appear anymore. I want to allow the user to edit from here as opposed to going to the manager. I want to make it as simple as possible

                Also, when I opened a page in the manager on preview and changed the php?id=2

                to

                about.php and reloaded

                The old page comes up with none of the changes made to static images and again the quick edit feature is gone

                When I migrate the modx cms over to live server and change modxHat/

                to

                thehatshop/

                will the user not see a list of files rather than a homepage, when they type the url www.thehatshop.com

                This is what I was worried about and I had wanted to change the home link to index.php


                  • 18367
                  • 834 Posts
                  Emma,

                  as I understand it you still have to be logged in to the manager to view the Quickedit features.I just open up two tabs. Not sure if you can login from the front end, would be nice. Perhaps someone else can answer that one.

                  Re reloading page: Could be a chaching issue. Try clearing the cache in modx, and your browser and do a forced reload of the page in the browser. (ctrl+shift+reload in FF, not sure what it is in MSIE)

                  Re home page: IF you set site homepage in MODx to the corresponding document id number it will load the page you tell it to.

                  In other words co to Tools/Configuration/ select the first tab "site" and you will se options to set the home page, error pages etc. Just enter the document id number and you’re set. The home page id will be something like "1" or "2", but you will see the id number next to each document in the tree anyway.

                  Even if you’re putting it in a sub directory (which seems to be what you’re suggesting) it will still work as I’ve explained.

                  Hope all that’s clear.



                    Content Creator and Copywriter
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    There is a snippet for allowing manager login from the front end.
                      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
                      • 8841
                      • 42 Posts
                      Thanks Susan, I will take a look


                      Mark, I’m still having this issue, when I log into the manager and right click on a file to preview

                      e.g. homepage

                      The page is displayed as index.php?id=1 and I see quickedit and any changed I have made using quickedit, which is fine.  When I use index.php instead of index.php?id=1, everything stays the same, again, this is fine

                      When I preview another file

                      e.g. about us

                      The page is displayed as index.php?id=2 and I see quickedit and any changed I have made using quickedit, which is fine.  However, when I use about.php instead of index.php?id=2, I lose quickedit, all the changes to text that I have made using quickedit plus ’image’ changes made using ’manage images’

                      Any solutions?