Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added cgi restriction note for IIS


Base virtual path 
Virtual path^/api(\/)(.*)$
If this rule matchesPerform an internal redirection
Next actionStop matching


The instructions for IIS cover two possible configuration scenarios, setting up a site dedicated for your API endpoint or adding an API endpoint to an exsiting site as a virtual directory. Please follow the section which applies to your configuration. Regardless of your configuration you must make security changes in IIS to enable the execution of EXE CGI scripts:

  1. Ensure the CGI-exe handler mapping has been configurated to allow execution.
    Image Added
  2. Add an ISAPI and CGI Restriction to enable OECGI4.exe to execute from the location where it resides. The actual path depends upon your site configuration and will be referenced in the instructions below.

    Image Added


Dedicated API site Domain or Subdomain

When setting up a website dedicated to host the API endpoint (i.e. ) follow these steps:

  1. Place OECGI4.exe in the website root directory so it is accessible using the path
  2. Update your ISAPI and CGI Restrictions settings to ensure OECGI4.exe is allowed to execute from the website root directory. 
  3. Create the following URL Rewrite rules in the root directory:


Your API will be accessible by two URLs. The primary URL for your API will be but you you can access to bypass the URL rewrite rules which may be useful to do as a troubleshooting step.

Adding an API to an Existing Site

When adding an API endpoint to an existing IIS site using a virtual directory (i.e. ) follow these steps:

  1. On the web server copy OECGI4.exe into a separate directory to be used as a CGI directory such as C:\revsoft\oecgiapi
  2. Update your ISAPI and CGI Restrictions settings to ensure OECGI4.exe is allowed to execute from the directory C:\revsoft\oecgiapi.
  3. In the website root directory create a virtual directory named oecgiapi pointing to c:\revsoft\oecgiapi. OECGI should be accessible using the url
    IMPORTANT: The virtual directory name should not be the same name as the virtual directory name. If your virtual directory name and API name are the same the IIS rewrite rules will require additional configuration to prevent IIS from ignoring the rewrite rules. This is outside the scope of the basic configuration guide contained below.
  4. Create the following URL Rewrite rules in the root site directory: