Highlighted

IIS outbound url rewrite

New Here ,
Nov 23, 2017

Copy link to clipboard

Copied

is it possible to set up Outbound url rewrite rules using Coldfusion and IIS?

If if anyone has this working, please point me to an example,

i have no no problem with IIS and .net or html pages but when I try .cfm either the server hangs or the outbound rules only work with the target page.

no issues with inbound rewrite

regards

Richard

Views

1.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

IIS outbound url rewrite

New Here ,
Nov 23, 2017

Copy link to clipboard

Copied

is it possible to set up Outbound url rewrite rules using Coldfusion and IIS?

If if anyone has this working, please point me to an example,

i have no no problem with IIS and .net or html pages but when I try .cfm either the server hangs or the outbound rules only work with the target page.

no issues with inbound rewrite

regards

Richard

Views

1.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 23, 2017 0
Advocate ,
Nov 24, 2017

Copy link to clipboard

Copied

What are you trying to do with the rules?

What rules are you using?

Without more information, its hard to say what the issue is.

I have had no issues with outbound rewrite rules so its likely an issue with your rule or IIS setup.

What version of IIS and CF?

Have you looked at any logs or tried Failed Request Tracing?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 24, 2017 0
Community Beginner ,
Nov 27, 2017

Copy link to clipboard

Copied

I am using CF11 and IIS 7. Outbound rule created by User Friendly template in IIS is:

               <rule name="OutboundRewriteUserFriendlyURL1" preCondition="ResponseIsHtml1" enabled="false">

                    <match filterByTags="A, Form, Img" pattern="^(.*/)catalog/catalog_item_page\.cfm\?style_code=([^=&]+)&(?:amp;)?style_name=([^=&]+)&(?:amp;)?category=([^=&]+)$" />

                    <action type="Rewrite" value="{R:1}{R:2}/{R:3}/{R:4}/" />

                </rule>

We are replacing our website with a new one and wish to set up friendly urls and also reroute links from the old site to the new.

I will have a look at trace logs

Thanks for your help

Regards

Richard

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 27, 2017 0
Community Beginner ,
Nov 30, 2017

Copy link to clipboard

Copied

I’ve done this before but its more of a hybrid with IIS rules and catching them as variables through application.cfc. It also uses extensionless urls. Can also use CF and error catching to act as a programatic redirect hub for all URL paths. What works for you really depends on use cases and the flexibility you need down the road.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 30, 2017 0
rdip LATEST
Community Beginner ,
Dec 13, 2017

Copy link to clipboard

Copied

Still no progress on this. I have set up Failed Trace logging and get the following which points somewhere but I don't know where

<EventData>

  <Data Name="ContextId">{00000000-0000-0000-6403-0080020000E9}</Data>

  <Data Name="ModuleName">RewriteModule</Data>

  <Data Name="Notification">536870912</Data>

  <Data Name="HttpStatus">500</Data>

  <Data Name="HttpReason">URL Rewrite Module Error.</Data>

  <Data Name="HttpSubStatus">52</Data>

  <Data Name="ErrorCode">2147942413</Data>

  <Data Name="ConfigExceptionInfo"></Data>

</EventData>

<RenderingInfo Culture="en-GB">

  <Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>

  <Keywords>

   <Keyword>RequestNotifications</Keyword>

  </Keywords>

  <freb:Description Data="Notification">SEND_RESPONSE</freb:Description>

  <freb:Description Data="ErrorCode">The data is invalid.

(0x8007000d)</freb:Description>

</RenderingInfo>

<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">

  <EventGuid>{002E91E3-E7AE-44AB-8E07-99230FFA6ADE}</EventGuid>

</ExtendedTracingInfo>

</Event>

Regards

Richard

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 13, 2017 0
Adobe Community Professional ,
Nov 24, 2017

Copy link to clipboard

Copied

I don't know if you can use IIS's rewrite mechanism for this. But you can use CF to do this yourself, using the onRequest method in Application.cfc. You can use this to rewrite practically anything that is part of the response. This can impose significant overhead if you're not careful, though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 24, 2017 0
Engaged ,
Nov 24, 2017

Copy link to clipboard

Copied

We've needed to do this in the past, but we didn't do it using IIS Rewrites. (NOTE: We use IISWebSpeed to perform many post-CF optimizations.)

We use getPageContext().getCFOutput().getBuffer() to capture the output buffer.  To change URLs, correct some third-party HTML and relocate desired CSS/JS to the footer (based on inline attributes), We use jSoup to remove/append/modify the HTML before delivering the HTML content to IIS.  (We've had to increase the buffer size and this method doesn't work if some content has already been flushed.)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 24, 2017 0
New Here ,
Nov 29, 2017

Copy link to clipboard

Copied

I have the outbound rule partially working. It rewrites the target but never finishes loading. This then has knock on effects elsewhere. I have a CFC which works when rule disabled but reports err_incomplete_chunked_encoding when I enable it. Does this point to a solution for anyone?

regards

richard

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 29, 2017 0