I'm no expert on this, and struggle with IIS config, so hopefully someone on
the list can help.  I'm trying to use URLs like
mysite.com/news/2014/the-article.  

Below is a url rewrite that rewrites a request like mysite.com/news/ to
myside/news.cfm.  That part works.  But, if you add another directory like
mysite.com/news/2014 it tries to rewrite to mysite.com/news/2014.cfm and
that does no good.  Does anyone know if  there is a way to get it this to
rewrite the .cfm only on the first url var after the first /? 

Thanks


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AddCFM" enabled="true">
<match url=".*" negate="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
</conditions>
<action type="Rewrite" url="{R:0}.cfm" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


Robert Harrison
Full Stack Developer
AIMG
[email protected]
Main Office: 704-321-1234 ext.121
Direct Line: 516-302-4345
www.aimg.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359786
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to