Web Hosting Talk







View Full Version : htaccess file


jmc67
09-25-2003, 12:26 AM
How can I get this .htaccess to show the ip address as shown below?
Thanks

<Limit GET>
order allow,deny
deny from 111.222
allow from all
</Limit>
ErrorDocument 403 "Access from IP address (ip here) not allowed

racksense
09-25-2003, 08:44 AM
Make the ErrorDocument point to a PHP file and then have the PHP code spit out the message with the IP.

Loon
09-25-2003, 09:39 AM
<? echo $_SERVER["REMOTE_ADDR"]; ?>

Unless they are behind a proxy/AOL

jmc67
09-25-2003, 11:50 AM
Yes, that is the way I was going to do it. I thought it could be done through htaccess without pointing to another file.


Thanks