How to Prevent Image Hotlinking through .htaccess

What is Hotlinking

Hotlinking is the process of displaying an image on a website by linking to the same image on another website. It is mostly occurs with images. In simple words suppose i want to show some gadget picture on my website so instead of uploading the picture on my website, i link this picture to someone website using source as

How to Prevent Allowed memory size Exhausted in PHP

If you are working on PHP, then definitely you are familiar with Fatal Error Allowed memory size exhausted. This error occurs when your PHP script exceeds the default memory allocated for execution. Due to which your scripts stop working and shows the error message that allowed memory size exhausted.

To know the default memory allocated for execution, you can check the memory limit in your php.ini file.

VI, VIM Commands , Cheat Sheet

Vi is a default editor in Linux operating systems. Vim is basically the improved version of the Vi editor. In this tutorial, We will learn Vi commands.
If you are new to Linux operating system and you don’t know how to start with Vi, Vim editor then in this tutorial we’ll important commands and their usage .

vi,vim editor beginners guide

Top ten most useful Linux commands for beginners

I already mentioned Vi is a default editor in Linux , Ubuntu and all other flavors of Unix operating system. To use Vim editor you need to installed it first.

How to extract .rar files in ubuntu/Linux

Extract .RAR files in Ubuntu

While working on ubuntu i tried to extract .rar file but it failed to extract and shows the error that archive type not supported.

So how to extract .rar files on Linux

Go to terminal and type following command

sudo apt-get install unrar 

After installing unrar on your system right click on rar file and extract them it will easily extract there.

Extract .RAR file in linux

How to Enable/Install apache mod_rewrite and mod_headers in ubuntu

Last week while i was working on url rewriting i face the problem. I had written the rule in .htaccess but forget to enable the mod_rewrite. Remember your .htaccess rule will not work until you enable the mod_rewrite.

How to install apache2 on ubuntu

Go to terminal (ctrl+Alt+T) and write the following command

Once apache2 installation is complete. Write the command mentioned below to enable mod_rewrite

After enable the mod_rewrite do the changes on following file

After done the changes restart the apache.

To restart apache2

Enable mod_headers in apache

Remember to restart apache 

So to restart apache2 write through terminal