November Happy Hour will be moved to Thursday December 5th.

Setting up multi-site in IIS express problem

Vote:
 

I was following the instructions in the training on how to setup a second site in Epi. The problem I updated my hosts file, updated my applicationhost.config file with bindings, updated my project to have a new startup url, but for some unknown reason the site is always redirecting me to the same page but with https:// using a 301 redirect. For the life of me I cannot figure out why. I cleared my cache, loaded up the site using localhost and removed all the other bindings except for the new one, and it still behaves this way. Doesnt matter whether I try to hit the home page of the site or the cms. What would do that?

#208494
Oct 25, 2019 0:10
Vote:
 

And just to clarify, I have not added a second site yet. I simply changed my existing site from using http://localhost:1659 to http://sitename.local:1659.

#208495
Oct 25, 2019 0:13
Vote:
 

Hey Jason,

"And just to clarify, I have not added a second site yet."

I think you should just go ahead and add the second site to Episerver, you will need a new Page to use as its Start Page. Then set each site to use different Domains, and report back if you still have a problem. 

While Episerver only has one Site, it makes sense that you keep getting the same page.

Here's a Thread that might help you set up multi-site in IIS Express https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2019/6/multi-site-and-localhost-visual-studio-debug-mode-using-iis-express/

#208496
Edited, Oct 25, 2019 1:01
Vote:
 

I finally figured it out. I had a single site, but had multiple bindings to test this out. But what I forgot was that I also had a rewrite rule in my web.config that forces everyone to https if they are not on localhost. I needed to amend that rule to include the new local addresses. Thanks for the help.

#208529
Oct 25, 2019 16:46
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.