We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12941
    • 87 Posts
    So, I am working on a site, just edited my htaccess file with my domain information as follows:

    # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^good2goevents\.com [NC]
    RewriteRule (.*) http://good2goevents.com/$1 [R=301,L]


    I have a document with the alias contact. In my site settings, I have the suffix set as /

    so if I go to http://good2goevents.com/contact/

    It just loads the homepage design, not the contact page. It doesn’t REDIRECT to the homepage... the URL says the same, but the content it’s displaying is the homepage. If I just MAKE up an alias that doesn’t actually exist on a page, the same behavior applies.

    Any idea what is wrong here? I used to set this up all of the time with older ModX versions with no issues.

    ModX Version: Revolution 2.0.4-pl2 Traditional
    ServerOS: UNIX / Apache
    MySQL Server: 5.1.50
    MySQL Client: 5.0.90
    PHP: 5.0.90
    Browser: Firefox 3.6.12

    Not sure about pdo_mysql or opcode caching. No relevant errors in the error log.

    This is a clean install, the only package I’ve added is getDocuments.

    I get an error in PHPMyAdmin:
    Your PHP MySQL library version 5.0.90 differs from your MySQL server version 5.1.50. This may cause unpredictable behavior.

      • 12941
      • 87 Posts
      OK, this is getting a little more complicated.

      About shows up, Contact doesn’t.

      So far those are the only two pages set up.

      It works if I go to http://good2goevents.com/contact.html ... but I don’t have my suffix set up as .html, I have it set up as /.

      If I go to http://good2goevents.com/about.html ... it doesn’t show the right page.

      ** confused **
        • 12941
        • 87 Posts
        I’ve also set up more pages... some of them work, some of them require .html or they won’t work.
          • 33983 ☆ A M B ☆
          • 181 Posts
          I was having a similar issues. This might help: http://modxcms.com/forums/index.php/topic,54523.0.html.

          Did you try to clear your site cache? Also go to some of pages that are not working and check the alias that your have for them. If you don’t have an alias that the file would be "id.html" not "alias.html". Containers don’t have the html suffix.

          Also check the docs: http://rtfm.modx.com/display/revolution20/Using+Friendly+URLs, if you have not already done so.
            • 12941
            • 87 Posts
            jgulledge,

            I just cleared my site cache, and no effect.

            I’m getting the urls by right clicking on the admin and selecting "Preview" ... that’s how I knew they were working with .html. They are obviously aliases and not ids, because it’s contact.html, not 4.html.

            I’m not using wayfinder or anything at the moment either. I’m just beginning to set up my templates and haven’t started to put much dynamic stuff into the site yet and I noticed I was having an issue with my URLs.

            I’ve already read that page about Friendly URLs about 7 times and have not found anything amiss with my settings, or anything that would hint on how to solve this problem.

            I’ve changed the content type from HTML to text back to HTML with no change.

              • 3749
              • 24,544 Posts
              Let’s back up. Are the links to your pages all in the form of MODx link tags? You should never use the name or alias of a page in a link to it.

              [[~##]]


              (Where ## is the ID of the page you want to link to?).

              IOW, to place a link to the page with an ID of 12, you’d do this:

              <a href="[[~12]]">Page 12</a>


                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
                • 12941
                • 87 Posts
                BobRay,

                I didn’t realize that. I usually get all of my templates and pages set up, and then go in and make everything dynamic. I used the [[~12]] you suggested, and in deed it is putting .html on a couple of my pages. I just don’t understand why it is adding that, and the rest of the pages are /????

                http://good2goevents.com
                  • 3749
                  • 24,544 Posts
                  Check out the container_suffix System Setting. You can set it to .html and everything will look the same, but friendly alias paths may look funny if you have them on (I haven’t tried it).

                  BTW, unlike Evolution, you can designate a resource as "not a container" in Revo by unchecking the Container checkbox -- even if it has children.

                    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
                    • 12941
                    • 87 Posts
                    BobRay,

                    I have this set to /, not .html.

                    What exactly am I supposed to be looking at here?

                    NOTE: the pages that have .html appended are not all containers, and vice versa

                    http://good2goevents.com/ -- uses template "Home"

                    http://good2goevents.com/contact.html -- uses template "Contact"

                    http://good2goevents.com/portfolio/ -- uses template "Portfolio"

                    http://good2goevents.com/corporate.html -- uses template "Services"

                    http://good2goevents.com/government.html -- container, but unchecked this in page settings -- uses template "Services"
                    -- http://good2goevents.com/government/iitsec.html -- container -- uses template "Portfolio Government"
                    ----- {{ just some docs I am storing data in to aggregate with ditto/getresources, whatever dang one I can get to work. }}

                    http://good2goevents.com/special-events.html -- uses template "Services"

                      • 3749
                      • 24,544 Posts
                      When you say "are not all containers" are you referring to the container checkbox? Have you cleared the site cache after changing things?

                      What happens if you change the container_suffix setting to .html?



                        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