Need help creating restful endpoints

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 12
Joined: 25 Jan 2013, 14:44

Need help creating restful endpoints

25 Jan 2013, 14:50

IIS 7.5
Windows Web Server 2008 R2
64bit
Coldfusion 9.01
ISAPI Rewrite 3.1.0.96 (registered)

This URL works:

https://website.com/api/index.cfm/case/view/2340.1.json

I want to remove the "index.cfm" from the URL. Here is my rewrite code:

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.96

RewriteEngine On
RewriteBase /api/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? index.cfm/%{REQUEST_URI} [QSA,L]

This works on my development box but not in production. Here is the error that is returned:

HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Ultimately, I want the URL to be in this format:

https://website.com/api/case/view/2340.1.json

The Rewrite.log in the application directory is empty.

Thanks!

User avatar
Posts: 12
Joined: 25 Jan 2013, 14:44

Re: Need help creating restful endpoints

25 Jan 2013, 18:23

After enabling logging, I see this in the Rewrite.log:

[1/25/2013 14:23:37] Begin watch directory changes failed (\\server1\xdrive\web applications\applications\api\): Insufficient permissions. (Access is denied.)

User avatar
Posts: 12
Joined: 25 Jan 2013, 14:44

Re: Need help creating restful endpoints

25 Jan 2013, 19:14

How do I give the program permissions to the network resource? Is there a service that needs to be assigned a domain user with rights to the network resource?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Need help creating restful endpoints

25 Jan 2013, 21:24

Hello,

Here's a part of documentation that explains the sufficient permissions

Regards
Andrew

User avatar
Posts: 12
Joined: 25 Jan 2013, 14:44

Re: Need help creating restful endpoints

28 Jan 2013, 16:14

Thanks for the link.

You will have to update your documentation for IIS 7.5.

Here is what I did:

Add domain account to local IIS_IUSRS group;
Add domain account to "log in as a service" under the local policy;
Add domain account to the "app pool properties" in IIS;
Add domain account to the network share where the .htaccess file is;

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Need help creating restful endpoints

28 Jan 2013, 21:17

That's a good call. Thanks.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests