We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22930
    • 5 Posts
    Please someone help, my host installed a version of modx in a sub directory.
    I have developed the site and happy to go live but after sending live and updating the .htaccess file to point to the /modx directory which works fine now my friendly URLS are showing modx/ in the URL which is not ideal and would rather just have the domainname.co.uk/about-us/ and not domainname.co.uk/modx/about-us can someone please look at my local host files and see if I am doing this correctly.

    /public_html/
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^(www\.)?DOMAINNAME\.co.uk$
    RewriteCond %{REQUEST_URI} !^/modx/
    RewriteRule ^(.*)$ modx/$1 [L]
    


    /public_html/modx/
    # Friendly URLs Part
    RewriteEngine On
    RewriteBase /modx/
    RewriteCond %{HTTP_HOST} .
    # Force all pages to go to www.domain.com for SEO
    RewriteCond %{HTTP_HOST} !^www\.DOMAINNAME\.co.uk [NC]
    RewriteRule (.*) http://www.DOMAINNAME.co.uk/$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
    
      • 22840
      • 1,572 Posts
      Have you edited the config / core config file ? if not theres around 6 paths that you need to change in there, also delete everything in the cache folder and re run setup in upgrade mode

      http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server
        • 22930
        • 5 Posts
        Hi Paulp

        Thanks for the response.
        So would it be better to move the install folder /modx to the root and then install modx again as upgrade mode? or can i just leave it where it is and update the htacess?

        Peter
        • I would suggest moving the install to the root and running the install in upgrade mode (or just manually correct the paths). Once moved you can eliminate the RewriteBase /modx/ (well make it RewriteBase /).
            Patrick | Server Wrangler
            About Me: Website | TweetsMODX Hosting