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

    Je cherche des infos sur la manière dont il faut modifier le fichier .htaccess pour pouvoir utiliser les URL simples.
    En fait, quand je renomme le fichier inclus dans la distribution (ht.access -> .htaccess), le site ne s’affiche plus (internal server error).

    Merci wink
      • 22303 MODX Staff
      • 10,725 Posts
      I believe the issue here is when renaming ht.access to .htaccess and using SEF URL’s, you receive an internal server error (somebody correct me if wrong). This is most likely caused by the PHP directives in the ht.access distributed with the product, or it is possible you have not enabled mod_rewrite in your Apache distribution (I believe XAMPP requires editing Apache’s httpd.conf file to activate the mod_rewrite module).

      PHP Directives:
      php_flag zlib.output_compression On
      php_value zlib.output_compression_level 5


      should be commented:
      #php_flag zlib.output_compression On
      #php_value zlib.output_compression_level 5


      If mod_rewrite is enabled, and commenting the PHP directives doesn’t work, the only other thing it could be is you have installed in a subdirectory and need to add the absolute path to the web root in the RewriteRule for MODx’s SEF feature.

      For instance, if you are in the subdirectory /modx/ within your web server root, change the RewriteRule to this...
      RewriteRule ^(.*)$ /modx/index.php?q=$1 [L,QSA]


      I hope that helps and someone can help translate if it makes no sense... wink
        • 6726
        • 7,075 Posts
        Thanks Jason for your reply ! I’ll give instructions to enable mod_rewrite in XAMPP (see below). You don’t need to comment out the zlib.output compression setting, the htaccess provided with MODx works flawlessly with XAMPP for Windows.

        Pour ceux qui ne comprendrait pas l’anglais, si vous avez un problème après avoir activé les URL Simples dans MODx, c’est que soit vous n’avez pas renommé ht.access en .htaccess ou que le module Apache mod_rewrite n’est pas activé sur votre serveur.

        Voir ce tutoriel :
        Comment activer mod_rewrite ?
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 28619
          • 4 Posts
          Quote from: OpenGeek at Nov 18, 2005, 01:36 PM

          I believe the issue here is when renaming ht.access to .htaccess and using SEF URL’s, you receive an internal server error (somebody correct me if wrong). This is most likely caused by the PHP directives in the ht.access distributed with the product, or it is possible you have not enabled mod_rewrite in your Apache distribution (I believe XAMPP requires editing Apache’s httpd.conf file to activate the mod_rewrite module).

          PHP Directives:
          php_flag zlib.output_compression On
          php_value zlib.output_compression_level 5


          should be commented:
          #php_flag zlib.output_compression On
          #php_value zlib.output_compression_level 5


          If mod_rewrite is enabled, and commenting the PHP directives doesn’t work, the only other thing it could be is you have installed in a subdirectory and need to add the absolute path to the web root in the RewriteRule for MODx’s SEF feature.

          For instance, if you are in the subdirectory /modx/ within your web server root, change the RewriteRule to this...
          RewriteRule ^(.*)$ /modx/index.php?q=$1 [L,QSA]


          I hope that helps and someone can help translate if it makes no sense... wink

          I just wanted to post and say that before I commented out the PHP Directives, I was receiving an Internal Server Error. The moment I commented the PHP Directives out and uploaded .htaccess to the server, the problem disappeared!

          Thanks OpenGeek! smiley
            • 6726
            • 7,075 Posts
            Indeed some server don’t have zlib installed, but better not comment those lines out if you have zlib support, since it’s more efficient smiley
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id