Forum


HomeHomePremiumPremiumAdministrationAdministrationDNN RedirectionDNN Redirection
Previous
 
Next
New Post
1/20/2014 10:42 AM
 

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. 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. 2.  Moved my site files to the public facing web server.
  3. 3.  Set up a site in IIS and configured the Bindings to contain the desired sitename, test.mysite.com.
  4. 4.  Updated the public facing DNS Record and loaded the URL in a browser.
  5.      4a.  In the browser I got a message that the provided URL wasn't configured in the database.
  6. 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.
  7. 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?

 
New Post
1/21/2014 2:57 AM
 
Hi Andy,

Quite hard for me to reproduce the same setup you have, but I will share with you the best practices I came to learn over many years dealing with DNN. 


Whenever I come across these types of redirecting issues, and they do came up which most of the time doesn't make sense, I clean up my portal alias and I leave just the one domain I need to run the site at that moment. If that changes because I need to move the site live or to another domain, then I just change the portal alias. I avoid keeping many aliases for the same site whenever I face those redirection problems.

You should also pay attention to the "default alias". This should be set correctly too.

This is my suggestion for you.

Best regards,
Aderson


 
New Post
1/21/2014 6:33 AM
 

I don't know why this was happening but I found some information that helped me out.

The one line post that helped, "Changing the setting advanced to humanfriendly in friendlyurl section of web.config solved my issue" .  I would like to understand why this was happening but right now, I only know that changing this setting prevented the redirection.

 
New Post
1/21/2014 7:25 AM
 

Great that you got it sorted out Andy and thanks for posting the tip back here. I will try that next time I come across something like that.

Cheers,

Aderson

 
Previous
 
Next
HomeHomePremiumPremiumAdministrationAdministrationDNN RedirectionDNN Redirection



Try FREE
30 days money back guaranteed