We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44437
    • 74 Posts
    Hey, can anyone assist me with this problem?

    I have installed ModX on a sub-domain on my development site "www.my.development.com/2014/mymodx"

    I have tried setting up friendly URLs by following this tutorial http://rtfm.modx.com/revolution/2.x/administering-your-site/using-friendly-urls but I am getting 404 errors.

    Here is my rewrite for the .htaccess

    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^www\.my.development\.com [NC]
    RewriteRule (.*) http://www.my.development.com/2014/mymodx/$1 [R=301,L]
    
    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    


    Can anyone tell me what I'm doing wrong? Thanks

    This question has been answered by sottwell. See the first response.

    • discuss.answer
      Is this a subdomain, or a subdirectory? If it's a real subdomain as a virtual domain in your Apache configuration, like mymodx.mydevelopment.com, then that should be working.

      If it's a subdirectory, mydevelopment.com/mymodx, then you have to add the subdirectory to the RewriteBase line:
      RewriteEngine On
      RewriteBase /mymodx/
        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
        • 44437
        • 74 Posts
        Ohhh thank-you thank-you thank-you laugh

        Such a noobie mistake
        • A subdirectory is not a subdomain. A subdomain may be in a subdirectory, though. wink
            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