Password protect a web directory with .htaccess
Apache references the .htaccess file in web document directories for access control information and other uses. A simple configuration allows password protection with multiple username/password combinations.
In the directory to be protected, create a .htaccess file with contents like this:
AuthType Basic
AuthUserFile /safe/dir/htpasswd
AuthName "Text displayed in popup"
require valid-user
AuthUserFile /safe/dir/htpasswd
AuthName "Text displayed in popup"
require valid-user
There are many other options for .htaccess, but these are basic password related options to get started. The AuthUserFile refers to a fully qualified file that should not be in the web server document directories. The htpasswd file can be named anything, there can be multiple files storing passwords for .htaccess, and each can be shared for use in multiple directories.
To create the first and second user/password pairs, use:
htpasswd -cb /safe/dir/htpasswd user1 password1
htpasswd -b /safe/dir/htpasswd user2 PaSsWoRd2
htpasswd -b /safe/dir/htpasswd user2 PaSsWoRd2
Additional user/password pairs can be added using the second form. Be certain to protect the htpasswd file.
Also see ...
Rewrite domain.com to www.domain.com using htaccess in Apache
H3You may want all visitors to your site using www in front of your domain name (www.yourdomain.com) instead of just your domain name (yourdomain.com). By implementing a simple .htaccess RewriteRule, visitors to yourdomain.com will see the URL change in their browser as they are redirected to the
H3You may want all visitors to your site using www in front of your domain name (www.yourdomain.com) instead of just your domain name (yourdomain.com). By implementing a simple .htaccess RewriteRule, visitors to yourdomain.com will see the URL change in their browser as they are redirected to the
Friendster : Removing Friendster Logo using CSS
H3Removing Friendster Logo in your profile using CSS./H3PHere's the code: (put this on on CSS codebox.) br / br /span style="font weight: bold"navigation img{width:0px;}/span br / br /*By giving an img a width of 0px, you essentially hide an object from the browser using only CSS
H3Removing Friendster Logo in your profile using CSS./H3PHere's the code: (put this on on CSS codebox.) br / br /span style="font weight: bold"navigation img{width:0px;}/span br / br /*By giving an img a width of 0px, you essentially hide an object from the browser using only CSS
Meta Refresh to Redirect
H3Easy way of using the meta refresh tag to redirect users/H3PThis recipe describes the meta refresh technique of redirecting users. By placing this tag in your span style="font weight: bold"head/span section of your html file, the user will be directed to another page after a set number
H3Easy way of using the meta refresh tag to redirect users/H3PThis recipe describes the meta refresh technique of redirecting users. By placing this tag in your span style="font weight: bold"head/span section of your html file, the user will be directed to another page after a set number
HTML Printing: Use a Style Sheet to Force a Page Break
H3Designing web pages for printing can be difficult. Here's how to force a printer to insert a page break./H3PDesigning web pages that can be easily printed can be very, very difficult. PDFs are perfect, but expensive to do dynamically. Anyway, here is a cheap way to insert a page break int
H3Designing web pages for printing can be difficult. Here's how to force a printer to insert a page break./H3PDesigning web pages that can be easily printed can be very, very difficult. PDFs are perfect, but expensive to do dynamically. Anyway, here is a cheap way to insert a page break int
