Tuesday, September 25, 2012

Mobile website not fit to the screen.

Open the Html file and write below code in the first line.

For Mobile site:

<!DOCTYPE html PUBLIC “-//WAPFORUM//DTD XHTML Mobile 1.0//EN” “http://www.wapforum.org/DTD/xhtml-mobile10.dtd”>

If Doctype is already exist like below then replace it.

For Desktop site.

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

Wednesday, September 12, 2012

Password Protect Directory using .htaccess

1) Create new .htaccess
and write below code in the .htaccess file.

AuthName "Section Name"
AuthType Basic
AuthUserFile /home/username/.htpasswds
Require valid-user