Is it posible to protect a website if the site was called by a given domain name?
e.g.
www.domain.com -> no password protection www.domain.net -> password protection
Both of the URLs are routed to the same document root.
.htaccessapache-2.2passwordpassword-protected
Is it posible to protect a website if the site was called by a given domain name?
e.g.
www.domain.com -> no password protection www.domain.net -> password protection
Both of the URLs are routed to the same document root.
Best Answer
If you have multiple virtualhosts, you can add password protection to one and not the other via the following directive:
Here is more information on this:
http://httpd.apache.org/docs/2.0/howto/auth.html