Sitefinity compatibility with the IIS URL Rewrite Module

Posted by Community Admin on 03-Aug-2018 05:48

Sitefinity compatibility with the IIS URL Rewrite Module

All Replies

Posted by Community Admin on 14-Nov-2016 00:00

Hi All,

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

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

Pointing a browser at MySitefinitySite should actually show the homepage from MyOtherSite. The URL should remain 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

Posted by Community Admin on 14-Nov-2016 00:00

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

Posted by Community Admin on 15-Nov-2016 00:00

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

Posted by Community Admin on 16-Nov-2016 00:00

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

This thread is closed