Interesting Developers Tips & Tricks
Mozilla Firefox
Addons I love to use in my work
- Web Developer 1.0.2, by Chris Pederick, released on Jan 31, 2006
- ColorZilla - Mozzila Firefox color picker
- SeoQuake - Seo extension
Web Quality Tips for Webmasters
JavaScript: Accessibility
Security Docs
Web SecurityWAP and WML
Wap and WML - Server Configuration and informationGoogle Site maps Tutorial
Google Site maps TutorialColor names hex Values and Meaning
check it!.HTACCESS, MOD_REWRITE Tips and Tricks
→ htaccess hotlink protection
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://pf.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pf.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://web.pf:80.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.pf.com:80.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://123.215.120.65.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://124.214.120.65:80.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$ http://www.pf.com/hot.html
RewriteRule .*[Gg][Ii][Ff]$ http://www.pf.com/hot.php
This simple htaccess script will protect your from `hot linking`. Upload it, create file:hotlink.html and open a beer. From this moment all requests to file types .jpg & .gif, which are external from your hosting location will be redirected to hotlink.html
→ userside javascript cookie access protection
RewriteEngine on
RewriteCond %{HTTP_COOKIE} !^.*acc=ok.*$
RewriteRule .*$ http://www.pf.com/logErr.htm
you may change acc=ok to some your personal passwords. Just create a file for example 'hack-mack-stop.js'.
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
function fixDate(date) {
var base = new Date(0);
var skew = base.getTime();
if (skew > 0)
date.setTime(date.getTime() - skew);
}
var now = new Date();
fixDate(now);
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
setCookie("acc", "ok", now);
link this javascript file in your target html file:
<link href="hack-mack-stop.js" type="text/javascript"/>
will create a cookie which one will be read from .htaccess and if the user were not on this page he/she won't get access to this dir.

