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

    I’m working with IIS7, Vista, firstly for testing and i have followed exact instructions as mentioned on this post: http://modxcms.com/forums/index.php/topic,10915.msg81058.html#msg81058 but not successfull. I have installed ISAPI Lite version on IIS7 and modx installed on main root wwwroot and i can view modx site using url: localhost, no sub folder, It is main root. But not successful, i am fedup with these friendly URLs i have tried everything but doesn’t work at all. Yes i have changed error pages 404 and 405 directions to index.php but still getting following errors:


    Server Error in Application "Default Web Site"
    HTTP Error 404.0 - Not Found

    Description: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    Error Code: 0x80070002

    Notification: MapRequestHandler

    Module: IIS Web Core

    Requested URL: http://localhost:80/geting-help.html

    Physical Path: C:\inetpub\wwwroot\geting-help.html

    Logon User: Anonymous

    Logon Method: Anonymous

    Handler: StaticFile

    Most likely causes:

    * The directory or file specified does not exist on the Web server.
    * The URL contains a typographical error.
    * A custom filter or module, such as URLScan, restricts access to the file.

    What you can try:

    * Create the content on the Web server.
    * Review the browser URL.
    * Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.

    More Information... This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.
    Server Version Information: Internet Information Services 7.0.


    Any help !

    Ta
      • 37550 ☆ A M B ☆
      • 711 Posts
      Hi if you are using v3 or the isapi rewrite you will need this rule:


      RewriteRule ^/(?!(?:manager|assets)/)(.*)\.html(?:\?(.*))?$ /index.php?q=$1?2&$2: [NC,L,U]

      This needs to be saved as .htaccess in wwwroot

      also make sure you can access index.php ok

      Aaron.
        http://www.onesmarthost.co.uk
        UK MODX Hosting with love.
        • 26031
        • 11 Posts
        Hello Aaron,

        Many thanks for your reply, and the code in another post. It seems ok now using following method:

        IIS7, ISAPI Rewrite 3 Lite, 404, 405 huh
        --------------------------------

        1- Installed ISAPI Rewrite 3 Lite on IIS7 (Refer to the relevant installation notes)
        2- in my case i have redirected the 404/405 error pages to index.php
        3- Open ISAPI Rewrite 3 Lite installation folder (in my case i have installed in C:\Program Files\Helicon\ISAPI_Rewrite)
        4- Open httpd.ini and copy and paste the following code (provided in the post: http://modxcms.com/forums/index.php/topic,10915.msg81058.html#msg81058)

        Code:

        [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]

        5- Save this file, if you can’t save the file and get error then Go into httpd.ini file Properties and UNCHECK from Readonly and then save.

        6- Now Log into MODx manager -> Click Administration -> System Configuration -> Friendly URL Settings

        My Settings are:

        Use Friendly URLS = yes
        Prefix for friendly URLS =
        Suffic for friendly URLS = .html

        This is what i have done and its working now. Remember Modx installation is in root folder wwwroot.

        I have done this using the help of this post : http://modxcms.com/forums/index.php/topic,10915.msg81058.html#msg81058 by Aaron Wardle. Thanks Aaron smiley.

        Regards,

        Sami


          • 26085
          • 494 Posts
          I use this http://learn.iis.net/page.aspx/557/translating-htaccess-content-to-iis-webconfig/
          for modx 1.0.0 it’s work fine for me. iis7