URL Rewrite for subfolders in IIS7

111 views
Skip to first unread message

Nick

unread,
Sep 18, 2016, 7:20:50 PM9/18/16
to ColdBox Platform

We have a bunch of different products served from a single root domain under different subfolders.

http://example.org/app1
http://example.org/app2
http://example.org/app3
...


We'll like to specify rewrite rules to transform:

http://example.org/app1/test/form

to:

http://example.org/app1/index.cfm?event=test.form


I know that it's possible to achieve this by adding the following to the root's web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
          <rules>
            <rule name="Rewrite to index.cfm">
              <match url="app1/([a-z0-9]+)/([a-z0-9]+)" />
              <action type="Rewrite" url="app1/index.cfm?event={R:1}.{R:2}" />
            </rule>
          </rules>
        </rewrite>
    </system.webServer>
</configuration>


What I want to know is if it's possible to achieve this by only modifying app1's web.config, i.e. without touching the root's web.config?

br...@bradwood.com

unread,
Sep 19, 2016, 2:11:30 PM9/19/16
to col...@googlegroups.com
Firstly, you need to be using the SES interceptor in ColdBox which means you'd rewrite the URL
I don't see why you shouldn't be able to handle this at the app level.  Have you been through our docs?
http://wiki.coldbox.org/wiki/URLMappings.cfm#IIS7_web.config 

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/de0e77a6-ceae-4c34-8b78-d2b7122f28e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages