-
Notifications
You must be signed in to change notification settings - Fork 4
SES URL Rewrite Config
cfchris edited this page Apr 24, 2013
·
2 revisions
You probably don't want your API URLs to contain "index.cfm" (e.g. /api/index.cfm/product/1). To get a cleaner URL (e.g. /api/product/1), you will need a URL rewrite.
Here is what you really need.
find: (^api/)(?!index\.cfm)(.*)
rewrite: api/index.cfm/{R:2}
Here are some detailed instructions for adding a rule to IIS.
- Install URL Rewrite.
- Open "Internet Information Services (IIS) Manager".
- Select the site your API folder is hosted under.
- Double-click the "URL Rewrite" icon.
- Click "Add Rule(s)..." in the upper right.
- Select "Inbound rules > Blank rule" and hit "OK".
- Enter something like "API (add index.cfm)" for the "Name".
- Enter "(^api/)(?!index.cfm)(.*)" for the "Pattern".
- Enter "api/index.cfm/{R:2}" for the "Rewrite URL".
- (Optional) You should probably check "Stop processing of subsequent rules".
- Click "Apply" in the upper right.
You should not need the "/index.cfm" in your URLs anymore.