Training redirect https to http in the host direct admin

In the previous article, I discussed how to redirect from https to HTTP in cPanel hosting, and if you use cPanel hosting, you could redirect site visitors from the site address with SSL to the site address without SSL and as a 301. Now, in this tutorial, I am going to discuss how to do this in Host Direct Admin. Sometimes it is necessary to provide https to HTTP redirection in your direct admin host so that users who enter the site address with HTTPS are automatically redirected to the site address with HTTP. Or, in the opposite case, redirect users from HTTPs to HTTP in Host Direct Admin. There can be different reasons for redirecting the site in both HTTP and https modes, among these reasons, you can mention the installation of SSL in the cPanel host or the removal of SSL.

In this tutorial, from Hostfa’s knowledge base, going to introduce how to redirect users on the site from the secure protocol HTTPS to HTTP. Using this tutorial, you can redirect users from your own address, which is HTTPS://site.com, to the site’s address with HTTP://site.com 301 redirect. In this article, we introduce two methods that use htaccess. And I will pay for the use of the plugin for WordPress sites that you can provide the redirect operation in the host direct admin.

Training redirect https to HTTP in the host direct admin

One of the best ways to redirect users from the secure protocol HTTPS to HTTP is to use the htaccess file. It exists in every content management system. For this purpose, you need to put codes in the htaccess file. First, log host and then click on the File Manager option to be directed to the file management page in the Direct Admin host.

Training redirect https to http in the host direct admin

After entering the host file manager, go to the Public_html path and look for a file called htaccess. look around Then click on the Edit button that is in front of this file, similar to the image below, to the edit page of the htaccess file. be shown to you.

Training redirect https to http in the host direct admin

After entering the editor page, put the following codes inside it and save it.

1
2
3
# Redirect HTTPS to HTTP
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

As you can see in the code snippet above, the redirection is done from HTTPS to HTTP, so that whenever a user enters the site address where SSL is installed, he will be automatically redirected to the site address without SSL.

Training redirect https to http in the host direct admin

Note that, if the file htaccess. It did not exist in your host, it is enough to use a text editor program such as notepad to create a file named htaccess. Build it and after putting the above codes in the file, upload it to the public_html path of the host.

HTTPS to HTTP Redirect in WordPress

In the above method using htaccess. It was applicable on any host and you can use it for any site builder system. But if you don’t want to use the code and you use WordPress, you can easily do this using the plugin. repository under the name HTTPS to HTTP Redirect WordPress and has managed to allocate more than 100 active installations to itself, which will provide you with the possibility of redirecting. To use this plugin, first click on the button below to be directed to the plugin page in the WordPress repository, then a tutorial on how to install and work with plugins in WordPress install and activate the plugin