DNN uses non-80 ports and always redirects to http: // solve the localhost Problem)

Source: Internet
Author: User
Tags dnn
Document directory
  • Solution:
  • Solution:
I encountered some problems when trying to install a DNN website on a server.
Question 1:

The first problem is that the website is always automatically directed to localhost. No matter how I try it, just enter the token.
Solution:

  1. This problem is easy to solve:
  2. Use host to log on
  3. Go to Admin-> Site Setting Page
  4. In the Portal Alias (website Alias) settings, add a new Http Alias "domain.com/dnn"

When the website uses the default port 80, this setting can solve the problem.

Question 2:

When I want to run this DNN website on port 8080, such as http://domain.com: 8080/dnn, the port number in the URL disappears if I click a link and want to go to another page, such as http://domain.com: 8080/will automatically become http://domain.com/

Solution:

After Google, I carefully read the web. config file and found it clearly indicated in the web. config file: <! -- Set UsePortNumber to true to preserve the port number if you're using a port number other than 80 (the standard)
<Add key = "UsePortNumber" value = "true"/> -->

I modified the ettings section and added the following line: <Add key = "UsePortNumber" value = "true"/>

At the same time, I added a new Http alias "domain.com: 8080"

After this modification, the port number will not be automatically dropped in the form of http: // localhost: 8080, either in the form of http://domain.com: 8080, or in the form of a http://domain.coom

Note: Later I found that this is not a problem with DNN, but a problem with router settings and port forwarding. This will be discussed later.

Question 3:

After adding the "UsePortNumber" setting, it does not solve my problem.

Solution:

For the machines that install DNN, the router settings will forward the data to port 8080 to port 80. So when I access http://domain.com: 8080, the URL obtained by the DNN Request object is actually a http://domain.com, and when DNN does URL rewrite, It is processing htpp: // domain.com.

This is a big problem for me. At first I wanted to write a 404 Page not found HttpHandler to solve the problem, but soon I realized that this event could not be triggered at all. Then I want to modify the handlers of DNN to solve this problem. Finally, I fixed the problem by modifying the IIS and Router settings.

  1. In IIS, I set the default site (the site where DNN is located) to use port 8080.
  2. In vro settings, the forwarding of port 8080 is changed from 80 to 8080 (actually, no forwarding is performed)
  3. Make sure that "domain.com: 8080/DNN" is added to the Http alias of dnn ".

All the problems have been solved.

Address: http://geekswithblogs.net/shahed/archive/2008/02/19/119788.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.