htaccess: I cannot allow access from a specific domain instead of IP

Viewed 346

I want to allow the connection from my LAN and in the case, that the external ip matches my ip (for when I use my domain to connect internal to my http server via browser)

I found this:

Require forward-dns bla.example.org

but I get an 403 Forbidden :/

My .htaccess looks like this:

Order Deny,Allow
Deny from all
Allow from 192.168.254.1/24
Require forward-dns mydomain.de

Thank you :C

1 Answers

Here is the answer I have worked out: I use a scipt to enter the IP address in the hosts file.

Follow the instructions from: https://www.the-art-of-web.com/system/apache-auth-ddns/

After that it works with the following command in .htaccess

Allow from yourDomain.de

Its not the best answer, but it will work.

Related