On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hello,

    I’m actually working on the website http://www.espacelyonjapon.com for efilippi.
    He wants me to set up a local development environment.

    I’m working with WAMPSERVER 2.0, MODx Evolution 1.0.0 and YAMS 1.1.9

    I have created a folder "elj" on my wamp localhost folder "www".
    I put all the files of the website on this folder and adapted the configurations of ModX to use a local database.
    The manager part works well. But when I want to see the website on http://localhost/elj, it redirects me on http://localhost/fr/Accueil.html (or http://localhost/fr/index.php?id=1 if I inactivate URL rewriting option) and tells me that :

    Not Found
    The requested URL /fr/Accueil.html (or /fr/index.php) was not found on this server.

    I think that it is a problem due to the url rewriting but I don’t know how to solve out my problem. I tried to use the .htaccess file but, as I don’t really know how YAMS works, I didn’t manage to find a solution.

    Thanks in advance
    • Hi,

      even it’s possible to work as you’re doing with the website in a folder fetched with localhost/folder/... honestly, you’ll spare a lot of hair creating a virtualhost on your local server you’ll fetch with http://elj.dev for example
      you’ll be in the same kind of configuration as on the distant server and everything, particularly when it comes to url rewriting will be easier to manage

      two things about the problem you describe you’ll run into even in the manager when telling yams a new template is bilingual for example.

      Have a look at your htaccess file, even when modx url rewriting is disabled, yams’ one work in order to interpret /fr/...
      you must have a RewriteBase / at the top of it
      when you use a subfolder ( / equals
      you can try and change this with RewriteBase http://localhost/elj/ but, once more avirtualhost would solve this easily without having to change a line in the htaccess

      the same for yams, nearly everything in yams is configured with $_SERVER[’SERVER_NAME’] which is... http://localhost in you case... what won’t help smiley

      believe me, set a virtualhost for your website, you’ll spare a lot of hair smiley

      Have swing
        réfléchir avant d'agir
      • I set up a virtualhost as you advised me to do and it works perfectly !!! Thank you very much !
        Have a nice day !
        • my pleasure smiley and you know what MODx FTW smiley

          Have a nice day too and, don’t forget, swing too...
            réfléchir avant d'agir