whether u use apache or use IIS your server can be with one IP only and have tons of sites with different domain names
and u distinguish by header
acessing IP/directory
is not sufficient always, because u run the application under the root, this can pass easily if u it is static site
if it is an application it needs configurations that doesnt always able to run under the root directory
what the problem now?
المفضلات