How to redirect www URLs to non-www?

How to redirect www URLs to non-www?

You can redirect all of the requests for www.yourdomain.com domain to yourdomain.com by modifying your website’s .htaccess file. You have to add the following lines in the beginning of the file so that the redirection is properly set up: 1 2 3 RewriteEngine On … Continued
My redirection set from cPanel shows an error

My redirection set from cPanel shows an error

When having problems with such redirection, log in your cPanel, go to the File Manager and navigate to the directory in which you’d like to set the redirection. Then rename the file .htaccess to htaccess. This will disable any previous redirection / rewrite rules which might … Continued
How to run simple shell scripts directly from a browser?

How to run simple shell scripts directly from a browser?

To be able to run shell scripts directly from the browser, you should add this rule to your .htaccess file: Options +ExecCGI AddHandler cgi-script .sh This tells the web server to treat .sh files as CGI scripts. To test this, let’s try … Continued
How can I create different types of web redirect with my cPanel?

How can I create different types of web redirect with my cPanel?

You can create different types of web redirects from your cPanel -> Redirects in the Domains box. The redirections can be Temporary and Permanent. Temporary redirects (as the name suggests) are not permanent redirects, which means that the page is sending status code 302 to the browser. The 302 code … Continued
How to use Server Side Includes (SSI) in your pages

How to use Server Side Includes (SSI) in your pages

By default, if you want to use Server Side Includes in your files, they have to be with .shtml or .shtm extension. Alternatively, you can add the following line to your .htaccess in order to specify different file types that should be checked … Continued
I have changed my domain and want to forward visitors to the new one

I have changed my domain and want to forward visitors to the new one

To ensure your new primary domain name is used, you should first park the previous primary one as shown in this tutorial and then redirect the old domain name to your new one by inserting this code to the .htaccess file in your public_html folder (you … Continued