Online CSS Compression Tools »
Allowing Access From 1 static IP and Deny the rest
Say you want to deny access to your entire site except when you access it. The following htaccess code does just that.
Instead of a Static IP you could also use a hostname, or part of a hostname..
AuthName "Site Administration" AuthUserFile /home/user/askapache.com/.htpasswd AuthType basic Require valid-user Order deny,allow Deny from all Allow from 24.11.54.6 Satisfy Any
More information about this technique can be found in the htaccessElite.com Authentication Forum
The love of liberty is the love of others; the love of power is the love of ourselves.
-- William Hazlitt
The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect. Tim Berners-Lee
Tags: admin, Apache, askapache, Elite, Htaccess, Htpasswd, post, Security, stat,
It's very simple - you read the protocol and write the code. -Bill Joy
HTML | DCMI | GRDDL | XOXO | XDMP | XFN | DOM | XML | XHTML 1.1 Strict | CSS 2.1 | W3C
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 License, just credit with a link.
This site is not supported or endorsed by The Apache Software Foundation (ASF). All software and documentation produced by The ASF is licensed. "Apache" is a trademark of The ASF. NCSA HTTPd.
UNIX ® is a registered Trademark of The Open Group.
POSIX ® is a registered Trademark of The IEEE.
Hi, regarding the actual htaccess file, where would I save this file on my web server? Do I give the file the extension “
.htaccess“?Thank you
Pawel