I am having a problem which is resulting in the redirection of my DNN site to a URL I use for development.
I have 3 machines where I wish to run the site, my local development machine, a development server visible only to people on my LAN, and a public facing server. My local development machine and the development server are on the same network. I run an instance of SQL Express is on each of the machines. After messing around on my local machine for some time, I wanted to move things to places where other people could see. To do this I did the following:
- 1. Backed up my local DNN database and another legacy database and moved them to the SQLExpress instance on the public facing server using the restore option.
- 2. Moved my site files to the public facing web server.
- 3. Set up a site in IIS and configured the Bindings to contain the desired sitename, test.mysite.com.
- 4. Updated the public facing DNS Record and loaded the URL in a browser.
- 4a. In the browser I got a message that the provided URL wasn't configured in the database.
- 5. I updated the site settings on my LOCAL machine and went through the process of backing up that database, moving it to the public facing server, and restoring the database.
- 6. I loaded the URL in the browser again, test.mysite.com and everything worked out just fine.
This all went basically as expected and worked out good. My problem occurred when trying to do the same thing on the LAN server.
To do this I went through basically the same process as above except to a different server. The process only differed in 2 ways. First, instead of loading everything and getting the message that the URL wasn't found, I added an entry to the Site Settings before moving the database to the LAN Server. I added this entry, dnndev.mysite.com to the URL Alias list just like I had previously added test.mysite.com. The second difference is the DNS update. Since this is on a LAN, I update the "hosts" file on each testing machine and configure dnndev.mysite.com with the IP address of the Server.
On my local machine I use the URL "local.mysite.com". This has been added to the Site Settings in DNN and to the "hosts" file. It works fine for testing on the local machine.
After setting everything up and testing using dnndev.mysite.com, I am redirected to "local.mysite.com". This redirection happens both when I test on the server, on my local machine, and on any LAN machine that I configure to point to dnndev.mysite.com. It really confuses me as to why this redirect is not happening with test.mysite.com on the public facing server, but it is happening on the LAN.
For testing I have completely removed the site from IIS on the LAN server and started again to make sure there is nothing conflicting there. I have also set up a new directory for the site files and put a single index.html file in the directory. When I use this setup, the site does not redirect. Since the redirect does not happen here, this indicates it is something in DNN rather than an external IIS redirect. When I change the IIS settings to point to the actual DNN site files, the redirect starts happening again.
It appears as if DNN is getting the URL from the web browser, then redirecting the user to the Alias set as the primary. This however only happens on the LAN Server and is not happening on the public facing server.
What is going on here?