Why I get access not allowed after changing password on PHPmyAdmin?

Standard

Sometimes when you change password for a account, it will say that mySQL pasword was changed (but it is either left the old one or added wrong one) so when you login to cPanel and start PhpMyAdmin you will get access not allowed error.

Workaround:
go to section MYSQL in whm and change passwords for users in that database once again. :)

How to redirect your site using a .htaccess file

Standard

As a configuration file, .htaccess is very powerful. Even the slightest syntax error (like a missing space) can result in your content not displaying correctly or at all.

Since .htaccess is a hidden system file, please make sure your FTP client is configured to show hidden files. This is usually an option in the program’s preferences/options.

1. Create an empty text file using a text editor such as notepad, and save it as htaccess.txt.

2. Edit the contents of the file. Check the following examples:

301 (Permanent) Redirect: Point an entire site to a different URL on a permanent basis. This is the most common type of redirect and is useful in most situations.

# This allows you to redirect your entire website to any other domain
Redirect 301 / http://mirhoseini.com/

302 (Temporary) Redirect: Point an entire site to a different temporary URL. This is useful for SEO purposes when you have a temporary landing page and plan to switch back to your main landing page at a later date:

# This allows you to redirect your entire website to any other domain
Redirect 302 / http://mirhoseini.com/

Redirect index.html to a specific subfolder:

# This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://mirhoseini.com/newdirectory/

Redirect az old file to a new file path:

# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://mirhoseini.com/newdirectory/newfile.html

Redirect to a specific index page:

# Provide Specific Index Page (Set the default handler)
DirectoryIndex index.html

3. Upload this file and re-name it to .htaccess.

What are A, AAAA, MX, CNAME, SRV and TXT (SPF) records?

Standard

A record is the most common type of DNS resource record. It tells a DNS server what IP address to map a host name to. With an A record, you can set www.yourname.com to point a specific IP address.

AAAA is the IPv6 version of an A record. IPv6 addresses are normally written as eight groups of four hexadecimal digits, where each group is separated by a colon.

MX a mail exchanger is a server setup to accept mail for your domain name and either holds it for delivering to your users or passes it to another mail server. To receive internet mail, your mail server should be SMTP compliant and run on port 25. For UNIX variants, two popular servers are qmail and sendmail. The MX record tells other mail servers where mail for your domain should go. The record should point to an A record. MX records have what are called “Preference Settings.” Preference settings tell other mail servers which server to try to deliver mail to first. The MX record with the lowest preference setting is the first server that is tried. When the primary server is not available, mail deliveries will go to the next lowest preference MX record. Higher preference mail servers should be set up to forward received mail to the lowest preference MX record.

CNAME record is a domain alias, and points a host name to another host name. Our interface automatically chooses whether a record is a CNAME or an A record based on the type of data you supply. If you type in an IP, it’s an A record. If you type in another host name (www.cnn.com), the record is set as a CNAME.

SRV refers to service record. It is a category of data in the Internet Domain Name System specifying information on available services. It is defined in RFC 2782. SRV records must point to the canonical name of the host. Aliases or CNAMEs cannot be used as valid targets.

SPF (Sender Policy Framework) is an e-mail authentication system that verifies that the message came from an authorized mail server. SPF is designed to detect messages from spammers and phishers who falsify the sender’s IP address in the e-mail header. SPF is an extension to the SMTP mail protocol.

The DNS system identifies the IP address of a receiving mail server with a line of text in the DNS database known as an MX record. DNS also supports a “reverse MX” record, which identifies the sending mail server and is used by SPF. When an e-mail message is received, the mail server checks the SPF record in the DNS to see if it matches the actual IP address of the message. If it does, the e-mail is considered valid.

How to manipulate files in Linux

Standard

Make a Directory:

$ mkdir dirname
$ mkdir dirname1 dirname2
$ mkdir -p dir1/dir2/dir3

Copy Files:

$ cp file file2

You can also copy multiple files into one directory with a single command:

$ cp file1 file2 file3 dir1

Moving or Renaming Files:

$ mv file file2

To move the file into another directory:

$ mv file dir1

If you want to rename the file to file2 and move it into another directory, you probably already figured out the command:

$ mv file dir1/file2

Deleting Files and Directories:

$ rm file

You can also delete more files at once:

$ rm file1 file2