+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Sitefinity compatibility with the IIS URL Rewrite Module

Sitefinity compatibility with the IIS URL Rewrite Module

4 posts, 0 answered
  1. Rae
    Rae avatar
    0 posts
    Registered:
    08 Nov 2016
    14 Nov
    Link to this post

    Hi All,

    I'm temporarily trying to rewrite the root request for a Sitefinity (9.2) site:

    http://www.mysitefinitysite.com/     -->     http://www.myothersite.com/

    Pointing a browser at MySitefinitySite should actually show the homepage from MyOtherSite. The URL should remain http://www.mysitefinitysite.com/.

    I'm using the URL Rewrite module of IIS for this, but I've found that Sitefinity is managing to intercept the request and override the behaviour. My rule is working fine on a non-Sitefinity site in IIS with the same rule.

    Is there a built-in URL rewriting module that I need to configure within Sitefinity?

    Thanks,

    Rae

  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    14 Nov in reply to Rae
    Link to this post

    If you trying to rewrite like that, you also need to install IIS Application Request Routing (ARR), to make a reverse proxy. 

    Sitefinity doesn't have any conflicts with URL rewrite and ARR module, look like the  problem in configuration of ARR

  3. Rae
    Rae avatar
    0 posts
    Registered:
    08 Nov 2016
    15 Nov in reply to Victor Leontyev
    Link to this post

    Thanks for the response, Victor. I've got ARR setup and running and I have this working fine with other sites.

     

    I've actually discovered that this issue is caused by Sitefinity responding with a 301 (Moved Permanently) HTTP code for the page. It looks like this is occurring because the Sitefinity site has been hosted under a virtual path. When a page is requested using a URL outside of this virtual directory, Sitefinity wants to redirect to the actual path.

    I had the same issue when attempting to rewrite the root site request (i.e. mysitefinitysite.com/) away from Sitefinity. This was the original impetus for placing Sitefinity in a virtual path.

    For the benefit of others, I have worked around this for now by creating a separate IIS site which will sit in front of the Sitefinity site and direct traffic appropriately.

     

    Is it possible to configure this redirect behaviour? It would be great if we could understand the circumstances that this occurs, too.

    Cheers,

    Rae

  4. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    16 Nov in reply to Rae
    Link to this post

    HI Rae. I got your point.

    Maybe you have old domain placed here: Settings->Advanced->System->Site URL Settings ?

    Try to play with this settings, may be it will help you to get rid of 301 redirect

4 posts, 0 answered