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

    I'm trying to edit a site locally, which one makes use of YAMS 1.2 RC3.
    The web site root is a subfolder of Apache's "htdocs".

    I edited the site's ".htaccess" file and restarted the Apache server:
    (...)
    Options +FollowSymlinks
    # Friendly URLs
    RewriteEngine On
    RewriteBase /ThisProjectSite/
    (...)


    But it's ignored and the "Server Config" tab of YAMS displays:
    # Friendly URLs
    RewriteEngine On
    RewriteBase /


    It appears that the site's .htaccess file is ignored.

    Can someone explain what I missed? Thanks.
    • There's a field "MODx Subdirectory" where you have to tell YAMS what the subdirectory is.
        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
        • 15001
        • 697 Posts
        You're right. It solved the problem.
        Thank you very much !
          • 15001
          • 697 Posts
          The tip of setting the MODx subdirectory worked like a charm on localhost.

          However, but I cannot remmeber how to adapt it to a remote server.

          In the address below, the site that I'm trying to configure is the "in-development-site":

          http://www.main-site.ext/projects/in-development-site.ext/fr/index.php?id=1

          I tried to set the MODx subdirectory to "/projets/in-development-site.ext" it was not recorded. (Solved by public write permissions to yams/modules/yams.config.inc.php)

          Edited:
          Inside the "main-site.ext" folder, the .htaccess is:
          SetEnv PHP_VER 5.3
          
          Options +FollowSymlinks
          # Friendly URLs
          RewriteEngine On
          RewriteBase /projects/in-development-site.ext/
          #AllowOverride all
          
          # Exclude /assets and /manager directories from rewrite rules
          RewriteRule ^(manager|assets) - [L]
          
          # The Friendly URLs part
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^fr/(.*)$ index.php?q=$1 [L,QSA]
          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 ^(.*)$ index.php?q=$1 [L,QSA]


          When I try to preview some page, the redirection is very slow as it takes several seconds and writes "0" instead of the document id:
          http://www.main-site.ext/projects/in-development-site.ext/fr/index.php?id=0

          Any idea what I'm missing? [ed. note: Jul last edited this post 9 years, 4 months ago.]