We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26082
    • 6 Posts
    Hello
    I am new to YAMS and have not much experience with .htaccess. Please help!much appreciated for your help !
    I’ve set YAMS and it could not add modx subfolder option !
    When I type home/ in field it says :
    Could not set the ’set MODx subdirectory’ option.
    It loads my homepage with right alias , example :http://domain.com/en/home.html .
    but it tries to load other pages in folder home/ and without language alias en/ or ru/,
    example :http://domain.com/home/about.html

    Here is my .htaccess :
    DirectoryIndex /home/index.php
    RewriteEngine On
    RewriteBase /home

    # 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} !^www\.example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    # Exclude /assets and /manager directories and images from rewrite rules
    RewriteRule ^(manager|assets)/*$ - [L]
    RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]

    # Redirect from mydomain.com/rootname to mydomain.com/rootname/
    RewriteRule ^en$ en/ [R=301,L]
    RewriteRule ^ru$ ru/ [R=301,L]

    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^en/(.*)$ index.php?q=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ru/(.*)$ index.php?q=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ 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

    What am I doing wrong ?

    Evo 1.4 , YAMS 1.1.9
      • 15001
      • 697 Posts
      I’ve set YAMS and it could not add modx subfolder option !
      When I type home/ in field it says :
      Could not set the ’set MODx subdirectory’ option.
      If MODx in installed in home, you'll have to set the MODx subdirectory. On the contrary, if MODx is direclty installed on domain.com, you should left blank the MODx subdirectory field.
      If MODx refuses to save the MODx subdirectory value, check the write access rights of the file /assets/modules/yams/yams.config.inc.php.
      It loads my homepage with right alias , example :http://domain.com/en/home.html .
      but it tries to load other pages in folder home/ and without language alias en/ or ru/,
      example :http://domain.com/home/about.html
      Did you forgot to setting the template used by your other pages as multilingual? Go to Modules > YAMS > Multilingual templates
      Here is my .htaccess :
      DirectoryIndex /home/index.php
      RewriteEngine On
      RewriteBase /home
      Not sure about this, but maybe should the value for RewriteBase have a slash at the end: "/home/".