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

    Can someone help me with recoding the default htaccess file to work with isapi_rewrite 2?

    Even though there are several posts, I can’t find anything about the default htaccess file and isapi 2.

    Thanks in advance.

    Tyronne
    • Sure,

      We used to use ISAPI Rewrite Version 2 all you need to do is create a file called httpd.ini in your website wwwroot folder with the following:


      [ISAPI_Rewrite]
      # 3600 = 1 hour
      CacheClockRate 3600

      RepeatLimit 32
      # Block external access to the httpd.ini and httpd.parse.errors files
      RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]

      # Block external access to the Helper ISAPI Extension
      RewriteRule .*\.isrwhlp / [F,I,O]

      RewriteEngine On
      RewriteCond Method GET|HEAD

      RewriteRule /(?!(?:manager|assets)/)(.*)\.html(?:\?(.*))? /index.php?q=$1?2&$2: [I,L,U]
        http://www.onesmarthost.co.uk
        UK MODX Hosting with love.
        • 29540
        • 58 Posts
        Many thanks!!