To redirect all www traffic to non-www URL - you need to add the following lines in .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] Replace example.com with your own domain name.
Continue readingCategory: Tips & Tricks
How to create Raid1 mirroring with 3rd & 4th Drives in OVH servers
OVH panel offers easy Raid configuration for the partitions in up to 2 drives. Recently I was working on a server that has 2 SSDs and 2 HDDs. The server is intended to serve as a Shared Hosting server. My idea was to install the OS on the SSDs and use the HDDs for hosting…
Continue readingHow to clean /tmp directory automatically in Linux/cPanel using tmpwatch
The “tmpwatch ” command in linux is to removes files which haven't been accessed for a period of time. The tmpwatch recursively removes files which haven't been accessed for a given time. Normally, it's used to clean up directories which are used for temporary holding space such as /tmp. If you are noticing "/tmp" getting…
Continue readingHow to recursively change Directory & File permission to 755 & 644 respectively
To change all the directories to 755 (drwxr-xr-x): find /directory_location -type d -exec chmod 755 {} \; To change all the files to 644 (-rw-r- -r- -): find /directory_location -type f -exec chmod 644 {} \;
Continue readingHow to force redirect http to https using .htaccess
If you have an SSL certificate installed and would like to force your website to load with https URL - you may add the following code in the .htaccess file (Linux based hosting): RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] You need to place the .htaccess file in the home directory of your website.
Continue readingUSSD codes of GrameenPhone, Robi, Banglalink, Airtel, Teletalk
GrameenPhone Prepaid Balance Check : *566# Show SIM Number : *2# or *111*8*2# Package Check : *111*7*2# Minute Balance Check : *566*24#,*566*20#, *566*22# SMS Check : *566*2#, *566*18# MMS Check : *566*14# Data (MB) Check : *566*10#, *567# Call Me Back : *123*Number# Net Setting Request : *111*6*2# Miss Call Alert (On) : type START…
Continue readingHow to delete Windows.old folder after Windows 10 update
I always keep adequate space in the system Partition (most of the times "C" drive). Because, the empty space is required to store various system files or Temporary Application files. Not enough space on this partition can often slow down the computer. I had 50+ GB free space in this 100 GB partition and only…
Continue reading10 best Web Hosting companies – Plans & Pricing 2019
# 1 HostGator is the largest shared hosting service provider in the whole world. There are good reasons for which millions of clients host there websites with HostGator. There service quality and support is superb and that is what set's them apart from others. Following are their Shared hosting packages: Besides Shared hosting - HostGator…
Continue readingWhitelist IP or IP range in/out using iptables
#Flush existing rules iptables -F # Set up default DROP rule for eth0 (Assuming eth0 is the Ethernet Port) iptables -P INPUT DROP # Allow existing connections to continue iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT # Accept everything from the 192.168.0.x network iptables -A INPUT -i eth0 -s 192.168.0.0/24 -j…
Continue readingWhy email accounts get hacked and How to prevent it
As a web hosting professional, I often come across with issues where clients' email get hacked. It is not something tough to guess what the consequences are: Sends out thousands of spam emails Steals financial or other important documents Pretends to be actual email sender and commits forgery Email domains and IPs get blacklisted and…
Continue reading