simulating a domain name with hostfile doesn't work as expected on IIS website - asp.net

I have added a domain name in hostfile
127.0.0.1 mydomain.com
I created a website under IIS7 binding to mydomain.com and created a blank index.html in the website folder for test
But when I type in browser http://mydomain.com it shows the file for IIS default website. Instead I have to type http://mydomain.com/index.html to get the right page.
Same result for index.aspx file
Why ? What should I do ?

The correct answer was to replace 127.0.0.1 with actual IP of the server.

Related

Issue with hosting subsite in IIS 10

Query regarding the configuration of website in IIS (Version-10.0.1741), we have configured a mainsite with name - Mainsite and subsite with name - Subsite. Both these sites have been mapped to two different physical paths with different content in index.html files only. Inside the server, basic settings of the mainsite is mapped to localhost and port 80. But when we try to browse the subsite http://localhost/Subsite/ it is always rendering the content of the mainsite and not the content of the subsite.
But we have tried everything in another server IIS, the same configuration is working fine. Mainsite and subsite content are loading fine.
Can someone suggest any part which must be checked or configured in our IIS for this issue. Thanks in advance.
Note:
We have tried adding virtual directory and converting that to website, but still it is not working
Also we have checked the permissions of the directory we have permissions to the physical path as well
We have tried URL rewrite from subsite to another mainsite called secondsubsite as well but then it is not working
We have checked the IIS event viewer logs and also checked the logs under IIS logging section still we haven't got any error logs

Creating a localhost version of a secure / https / SSL website

I am trying to copy one of my websites to a localhost MAMP server for further development.
I bring you this as I am unable to access the site due to:
"This site can't provide a secure connection
localhost sent an invalid response.
ERR_SSL_PROTOCOL_ERROR"
I have:
Copied public_html folder to MAMP.
Copied Database Collation and Data.
Created a new user and applied this to the WP-config.
Removed the .htaccess instructions.
Adjusted the options DB to have http://localhost as 'siteurl' & 'home'.
Restarted my computer and local server.
When I go to localhost:8888 it reveals the folder I created. However, when I click it will add
https:// before the URL and give me the error.
Any help you can give would be appreciate, Jason.

Typo3: How to handle multi-domain in a development environment

I have a website with multiple domains (each domain has its own tree). On the live server everything is fine, but when I develop on localhost I have a problem:
I cannot (pre)view any pages from the other domain leafs.
Website1
www.domain1.com
localhost
Website2
www.domain2.com
The above domain records allow me to view all pages of Website1 - but when I want to see a page from Website2, I am redirected to www.domain2.com
e.g. //localhost/?id=100 redirects to //www.domain2.com/?id=100 which results in a 404 of course, because the page is not part of Website1 tree.
I am not able to enter localhost as a domain record for BOTH website roots.
Of course I could install virtual hosts on my local server, but this seems not convenient - I hope there is better solution.
EDIT:
When I add the language id to my URL, it works:
//localhost/?id=100&L=0
:-o
Localhost says to me: you have a local copy of the Website.
If so: disable all domain records, add
config.baseURL >
config.absPrefix >
To your root settings. I guess one or both of them are set.
Christian

Remove solution/folder name from url in sitefinity project while running on localhost

I have one Telerik sitefinity project developed on other machine. When I configure the project on my system and run on localhost it takes folder/solution name in url. Therefore while clicking on links it give 404 not found error.
Url created now is:-
http://localhost:xxxx/ProjectName/home
What I want is:-
http://localhost:xxxx/home
Just create a new website in IIS and point it to the project folder.
Then browse it using the host header of the site, e.g. localhost or even something like mysite.localtest.me (*.localtest.me will point to 127.0.0.1)

Local testing for sub-domains using Url rewriter, Asp.Net 2

I am using UrlRewriting.Net for url rewriting in Asp.Net 2 and IIS 5.1 (offline) and IIS 6 (online)
The application performs the following:
A url of the following nature: http://username.site.com is re-written as
http://site.com/Default.aspx?user=username
This works perfectly online. However, I would like to know how we could test this offline.
I have tried pointing the application to 127.0.0.1 via IIS and then putting username.site.com in the hosts file to point to 127.0.0.1 - but it does not work out.
The website loads up - but the querystring is not generated.
Also tried putting just site.com -> 127.0.0.1 in the hosts file and accessing username.site.com. But in this case, the website does not load (site not found)
Any ideas?
easy way to test this will be to edit your hosts file so that username.site.com points to 127.0.0.1, but you will have to do this for each user you want to test on each PC...
Okay.
I managed to get this working. Its simple if you think about it.
I got myself a DNS server, installed it on my system and configured it to serve me pages from 127.0.0.1 for site.com
If you are wondering, I used a DNS server called SimpleDNS from http://www.simpledns.com/
There is also a free BIND DNS server available from:
http://oldwww.isc.org/sw/bind/view/?release=9.6.1b1&noframes=1
But that was too much for me to configure at this point of time.

Resources