New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...IIS Rewrite and DNNFriendlyUrl when "advanced" modeIIS Rewrite and DNNFriendlyUrl when "advanced" mode
Previous
 
Next
New Post
4/15/2014 7:20 AM
 

Hello!
There are two site: site A is DNN (v 7.1.2) and site B isn't DNN
I have to configure some URL rewrite rules for "hiding" CROSS DOMAIN requests from A to B. So I want:
when request http://A/customscript -> rewrite to http://B/customscript
I've configured on IIS: enabled Proxy in Application Reqeust Routing (ARR) extension and added rules for site A in IIS URL rewrite module:

<rewrite>

            <rules>

                <clear />

                <rule name="rewrite customscript" stopProcessing="true">

                    <match url="^customscript" />

                    <action type="Rewrite" url="http://B/customscript" appendQueryString="false" />

                </rule>

            </rules>

        </rewrite>

When "humanfriendly" mode is enabled in web.config for DNN all works fine as expected. I've seen URL http://A/customescript but executes http://B/customscript
Dnn web config:
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="HumanFriendly"/>

BUT when I switch to "advanced": I've got 404 from A-site. Looks like DNNFriendlyUrlProvider intercepts what was done by IIS URL Rewrite (I checked IIS failed request log and saw that IIS URL rewrite module done his job correctly)
<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="advanced"/>

How can I fix it? I want use "advanced" mode together with IIS URL rewrite module

 
New Post
12/4/2015 1:38 PM
 
I had a similar issue on the past, I created two websites A (Non DNN website that contains the IIS rewrite rules ), B (regular DNN website), in my case the website "A" and website "B" do not have the same domain, it turn out that the issue with the 404 was trigger by the DNN website because the portal alias of the website "A" was not register properly.

Try adding the portal alias for the domain that will be public visible or turn on the "Auto Add Site Alias" flag on your site.

Hope it helps,
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...IIS Rewrite and DNNFriendlyUrl when "advanced" modeIIS Rewrite and DNNFriendlyUrl when "advanced" mode


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.