Re: Allowing access to only one host/referer
| From: | Jasper Bryant-Greene | Date: | Fri, 02 Sep 2005 04:54:10 +0000 |
| Subject: | Re: Allowing access to only one host/referer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221738@lists.php.net to get a copy of this message | ||
Dan Rossi wrote:
Hi there, i was wondering how I could allow access to a script from another server/host only ? Its prob a silly question but i guess get their host ip ? The thing with that is one server which is a webpage has a javascript popup to load the script on the other server, and i believe that in this scenario it doesnt send referer info. Let me know.If you're on Apache and have .htaccess files enabled, put this in: Order Deny,Allow Deny from all Allow from [allowed_ip] Obviously replace [allowed_ip] with the IP address. You can also do partial IPs, whole networks, and other cool stuff. See: http://httpd.apache.org/docs/2.0/mod/mod_access.html#allow -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ If you find my advice useful, please consider donating to a poor student! You can choose whatever amount you think my advice was worth to you. http://tinyurl.com/7oa5s