You can stop others from hotlinking your site images by placing a .htaccess  file in your website main directory:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)*$ [NC]
RewriteRule \.(gif|jpg|png)$ [R,L]

  1. The first line of the code enables the rewrite.
  2. The second line will block any website other than your own.
  3. The No case [NC] code will match the url regardless of being in upper or lower case letters.
  4. We allow empty referrals on the third line.
  5. The last line matches any files ending with the extension gif jpg and png. The hotlinked image will be replaced by the image specified here. You can also use here a link from another domain.

With Red Hat Enterprise Linux 5.9 begins the Production Phase 2 of Red Hat Enterprise Linux 5. This demonstrates that the company is continuing the effort to provide stability and the desire to keep all the customers.

This version has some new features like hardware enablement, security, standards and certifications, developer tools, virtualization and more are included.

See the press release and the detailed release notes for more information.

All existing RHEL customers can obtain the updated installation DVD images from Red Hat’s download centre.


In the following how-to I will show you how to install and configure a PPTP VPN on Debian.

Step1. Install PPTPD 

apt-get install pptpd

Step2. Configure PPTP

After installing PPTPD , open the file /etc/pptpd.conf.

nano /etc/pptpd.conf

Then go to the end of the file where you can see examples of localip and remoteip.
Below them add your own values for localip and remoteip.


Now, uncomment the ms-dns lines from /etc/ppp/pptpd-options file and change them to to the dns servers provided by your ISP. Continue Reading…

Recently I upgraded the MySQL server and I enabled InnoDB and then I was not able to start the MySQL Server.

The next step was to check the mysql logs and I saw the error:

InnoDB: Error: log file ./ib_logfile0 is of different size 0 5256780 bytes
InnoDB: than specified in the .cnf file 0 1077645824 bytes!
[ERROR] Plugin ‘InnoDB’ init function returned error.
[ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting

The solution for this error is:

Remove the ib_logfile0 and ib_logfile1 files located in /var/lib/mysql.

rm /var/lib/mysql/ib_logfile0
rm /var/lib/mysql/ib_logfile1 Continue Reading...

Piping Commands Together

The pipe character “|”  is usually used to chain 2 or more commands. The pipe command will take the standard output (STDOUT) from the program that you are using and will sent as standard input (STDIN) for the command after the pipe.

Example: [email protected]:~# ls /var/log/ | grep mail

The “pipe” command will take the output of the ls command and “pipes” into the input of the grep command.

Redirecting Program Output to Files

There are situations when you want to save the output of a command to a file rather than displaying it on the screen or both save to a file and display. For instance if you want to create a file that contain a list of all files and directories from /var/www you can do something like this:

ls /var/www > www_list.txt

This will redirect the standard output to www_list.txt

Another similar command can be written so rather than creating a new file called www_list.txt to append the output to the end of the original file.

ls /var/www >> www_list.txt

  • > – if the file does not exist will be created,
  • >> – will append to the end of the file, and if the file does not exist will be created,
  • 2>> – will append only error to the file
  • 2>&1 – will redirect errors and the output in the same place.