Web Servers: Why there is difference in behavior of file download dialogue between IP address and Domain name in URL?
-
In intrAnet, When I give something like 'xxx/download/check.xls' and if this file is not present in this location, the webserver provides the right error message. But instead if I try the IP address instead of the domain name (eg: 10.10.10.10/check.xls) then the browser throws me a file download dialogue. Please note that such a file does not exist. When I click on 'save' or 'open' then it says that such a file is not there or the file is corrupt... any reason why this happens?
-
Answer:
What you see has nothing to do with download a such. Say you have a server on the internet with one IP Adress (like 50.17.196.92), this server may have several domain names that all resolve to this IP Adress (like http://mydomain.com, http://otherdomain.net, http://somethingelse.org). So in the example with three domains and one IP Adress, we end up with four possible URLs: http://50.17.196.92 http://mydomain.com http://otherdomain.net http://somethingelse.org Requesting any of these URLs from your browser will lead to the same server. But the server will react differently to every URL. If you are using Apache as your web server software, you can configure this behaviour using the <VirtualHost> Directive. You can set up a virtual host for every domain, and you can have a default configuration for all requests that are 'left over'. See http://httpd.apache.org/docs/2.1/en/vhosts/name-based.html
Brigitte Jellinek at Quora Visit the source
Related Q & A:
- How to disable HTTPS for a domain that shares IP with another domain that is under HTTPS?Best solution by Server Fault
- How can I get the IP address of the person through his email address?Best solution by Yahoo! Answers
- How Do You Buy A Domain Name Outright?Best solution by Yahoo! Answers
- How to fool an IP address Tracer into believing another IP address?Best solution by Yahoo! Answers
- How do I change the alias on my Yahoo! domain name to web.me.com?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.