How and when to use robots.txt file

We have heard of crawlers and bots are crawling our sites to scrap content for various reasons like indexing in search engines, identifying content, scanning email addresses, etc. There are all kinds of crawlers/bots which crawl websites. While some are good which should be allowed access to our site, but we might want to restrict […]

How and when to use robots.txt file Read More »

Getting real client IP address in PHP

Many times we need the visitor’s ipaddress for validation, security, spam prevention, etc. Getting the Visitor’s ipaddress is very easy in PHP. The simplest way to get the visitor’s/client’s ipaddress is using the $_SERVER[‘REMOTE_ADDR’] or $_SERVER[‘REMOTE_HOST’] variables. The variable in the $_SERVER array are created by the web server (like apache) and we can use

Getting real client IP address in PHP Read More »

more .htaccess tips

In my previous post .htaccess tips I had started with what is .htaccess file and some things that can be done using it. In this post I’ll cover more about .htaccess files. Topics Covered: Directory index file Redirection Preferred domain (www or non-www) Redirect old site to new site Redirect all files in a directory

more .htaccess tips Read More »

.htaccess tips

Topics Covered: What is .htaccess file? When to use .htaccess file? Disadvantage of using .htaccess file Authentication using .htaccess file Custom Error Document Allow/Disallow Directory Listings What is .htaccess file? .htaccess file is used on Apache Web Server to make configuration changes on per-directory basis. This file contains the configuration directives and are applied to

.htaccess tips Read More »

Cachebuster code in JavaScript

Cachebuster code in JavaScript Read More »