htaccess-rules for different domains

I have multiple domains / subdomains running on my server. I want to add a authorization-rule, if a certain url is called.

To make it easier to understand:

If the user enters www.example.org, everything should work normal.
But if the users enters staging.example.org, a .htaccess-rule should trigger and call the password-prompt.

Even if both of the sides would lead to the same directory on my server, it should be depending on what the user entered in his browser.

Is this somehow doabele?


Source: apache

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.