We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37117
    • 24 Posts
    Hello,

    I`ve got some weird issue with my client site.

    There is a modx-revo 2.2.4 installation in a subfolder called /modx. Entering the site trough path given by a host company works just fine - ex. clientname.hostingcompanydomain.com/modx

    But when I want to enter the site trough a domain, strange things happens (domain is pointing to /modx subfolder). At the first glance everythnig looks normal, except the way wayfinder links to a homepage. When I click on a subpage wayfinder takes me to domain.com/subpage.html and that`s correct but when i click on a homepage link it takes me to domain.com/modx and gives 404 error (correct url would be just domain.com)..

    When I`ve added <base href="[[!++site_url]]" /> to <head> tag i`ve found that modx thinks that he is in domain.com/modx directory which is untrue.

    My .htaccess looks this:
    # For full documentation and other suggested options, please see
    # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    # including for unexpected logouts in multi-server/cloud environments
     
    #RewriteEngine On
    RewriteBase /modx
     
    # Fix Apache internal dummy connections from breaking [(site_url)] cache
    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
    RewriteRule .* - [F,L]
     
    # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^example\.com [NC]
    #RewriteRule (.*) http://example.com/$1 [R=301,L]
     
    # Exclude /assets and /manager directories from rewrite rules
    #RewriteRule ^(manager|assets) - [L]
     
    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /modx/index.php?q=$1 [L,QSA]
     
    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5


    I would be grateful for any help ;(

    Best regards
    Chriss
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      It actually is true that MODX is in a subfolder. Simply pointing your domain to the subfolder isn't enough however.

      Look through the following thread, and check out the links contained within. You're going to need some more .htaccess rules to get this working. Specifically, check out Susan Sottwell's solution for subdomains.

      https://forums.modx.com/thread/?thread=73954#dis-post-410673

        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster