We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24946
    • 17 Posts
    I installed modx on http://domainname.com/mod

    I finally learned how to port a website into modx with the aid of a youtube video - incredibly easy.

    However, when I point my browser to domainname.com/mod, I get an Error404 page.

    The page shows up fine when I click ’preview’ in the manager. In the manager the page comes up as "http://domainname.com/mod/index.php?id=32"

    I am also getting the following configuration warning: "One or more configuration details didn’t check out OK:

    Configuration warning: Your site’s Unauthorized page is not published or does not exist."

    What does this mean?

    Thanks for answering all my dumb noob questions, I feel I will get the hang of this.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I take it that you have enabled Friendly URLs (page.html instead of index.php?id=xx)? Did you rename the ht.access file to .htaccess? And did you edit its RewriteBase / line to be RewriteBase /mod?

      As for the Unauthorized page, that is set in the configuration. It must be set to the ID of a resource that exists, is publish, and has not been flagged for deletion.
        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
        • 24946
        • 17 Posts
        The .htaccess file within the "mod" folder was, for some reason, entitled ".htaccess_"

        I renamed it, and it became readable. I added "/mod" after RewriteBase, but am still getting a 404 Error message. There is also an .htaccess file at the root, not in the "mod" folder, but this does not have RewriteBase. I tried adding RewriteBase /mod there, but it didn’t do the trick.
          • 24946
          • 17 Posts
          I followed the instructions per modx’s wiki:

          http://rtfm.modx.com/display/revolution20/Using+Friendly+URLs

          but still no go.

          This is what I input into my .htaccess, ’mydomain’ being my actual domain, and not its placeholder:

          # Friendly URLs Part
          RewriteEngine On
          RewriteBase /mod
          RewriteCond %{HTTP_HOST} .
          # Force all pages to go to www.mydomain.com for SEO
          RewriteCond %{HTTP_HOST} !^www\.mydomain.com [NC]
          RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]
          # Friendly URLs
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
          # Additional Settings Follow
          ExpiresActive On
          ExpiresByType image/gif A2592000
          ExpiresByType image/jpeg A2592000
          ExpiresByType image/png A2592000
          BrowserMatch "MSIE" brokenvary=1
          BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
          BrowserMatch "Opera" !brokenvary
          SetEnvIf brokenvary 1 force-no-vary

          I have an entire (non-modx) website at the root, does that matter? I also only have one page at the moment in modx (’home’), but don’t remember telling modx that any page will be the index.
            • 4310
            • 2,310 Posts
            Try :
            RewriteBase /mod/
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Is this just installed in the subdirectory "mod", is it a subdomain, or is it a virtual domain? If it’s an Apache virtual domain, you don’t need the /mod in the URL, and you don’t need it in the RewriteBase either.
                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
                • 3749
                • 24,544 Posts
                It definitely sounds like an .htaccess problem. The rewrite is off when you’re previewing from the Manager.

                What URL is on the 404 page?
                  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
                  • 24946
                  • 17 Posts
                  Bunk, tried that.

                  Susan, I think it’s a subdirectory. (mydomain.com/mod)

                  Bob, it’s http://www.mydomain.com/mod/index.php?id=32
                    • 24946
                    • 17 Posts
                    I re-installed the modx sample site, replaced the template with my own, replaced the element’s content with my own, and it works. I cleared the .htaccess file and it still works.