Riz Khan on April 24th, 2010

If you want to redirect your visitors every time they catch into an HTTP 404 error, use can use the below code in your .htaccess file :

ErrorDocument 404 /errors/notfound.html

This redirects the user to /errors/notfound.html whenever a 404 error happen. You can of course redefine also other http errors codes (403, 500… and so on)

Tags: ,

Riz Khan on April 24th, 2010

You can tar or untar folders using below commands, and additional you can zipped them too :

To Compress a folder:
tar –czvf foldername.tar.gz foldername

To Uncompress a tar file:
tar –xzvf foldername.tar.gz

To View files within tar.gz:
tar –tzvf foldername.tar.gz

To Create tar only:
tar -cvf foldername.tar foldername

To Extract tar only:
tar -xvf foldername.tar

To View tar only:
tar -tvf foldername.tar

Tags: ,

Riz Khan on April 24th, 2010

Many times old DNS cache in the local computer result in resolution failures or resolution to a wrong IP, this can be corrected by clearing the DNS cache using below method :

– Open Windows Command Prompt
– Then issue below command :

ipconfig /flushdns

Tags: ,

Riz Khan on April 24th, 2010

First select the Mysql version you want to install from WHM > Tweak Settings

Then login via shell and issue below command :

/scripts/mysqlup --force

Once the install is complete , check mysql version and then compile php/apache to make it load new libraries by using below :


(Select modules and other settings according to your choice from easyapache menu)

Once its complete you are done !

Tags: , ,

Riz Khan on April 24th, 2010

The plesk logs are located at below path :


So you can monitor the logs using below command :

tail -f /usr/local/psa/var/log/maillog

Tags: , , ,

Riz Khan on April 24th, 2010

On Virtouzzo VPSs you can calcualte the Guaranted, Buestable and other memory usage using below formulae :

Guaranteed memory = barrier of vmguarpages / 1024 * 4

Burstable memory = privvmpages / 1024 x 4

Current Memory Usage = physpages held value /1024 * 4

Current Usage (RAM + SWAP) = oomguarpages held value /1024 * 4

Tags: , , ,