Hi i've got another question, i'm writing a simple website in PHP and i have problem with visibility of my website in local network to make it visible to remote addresses i used
$_SERVER['REMOTE_ADDRESS']
, but i want to make it visible in my LAN.
How can i do this ??
also in .htaccess you can allow from your ip/subnet, like this:
Order Deny,Allow
Deny from all
Allow from 192.168.1.1/24
of course it should match your LAN
You should be doing this in your .htaccess file.
First you specify a Deny All, then specify a list of IP addresses that should be allowed.
order deny,allow
deny from all
allow from X.X.X.X
allow from X.X.X.X
allow from X.X.X.X
You can allow ranges like this:
allow from 10.0.0.0-10.255.255.255
allow from 10.0-255.0-255.0-255
allow from 10.*.*.*
If you want to allow 1.2.3.254
, 1.2.3.255
, 1.2.4.1
, 1.2.4.2
, 1.2.4.3
, and 1.2.4.4
,
you can do it like this:
allow from 1.2.3.254-1.2.4.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With