Category Archives: .htaccess

How To Redirect HTTPS To HTTP Or HTTP To HTTPS From HostGator Hosting

I am using HostGator Hosting, I would like to know how to redirect https to http url or http to https url

You can try following methods to redirect https to http or http to https url for your HostGator Hosting

.htaccess

http to https

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

https to http

RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

PHP

http to https

if($_SERVER["HTTPS"] != "on"){
    $host = $_SERVER['HTTP_HOST'];
    $request_uri = $_SERVER['REQUEST_URI'];
    $new_url = "https://" . $host . $request_uri;
    header( "HTTP/1.1 301 Moved Permanently" );
    header( "Location: $new_url" );
    exit;
}

https to http

if($_SERVER["HTTPS"] == "on"){
    $host = $_SERVER['HTTP_HOST'];
    $request_uri = $_SERVER['REQUEST_URI'];
    $new_url = "http://" . $host . $request_uri;
    header( "HTTP/1.1 301 Moved Permanently" );
    header( "Location: $new_url" );
    exit;
}

cPanel

http to https

Home >> Domains >> Redirects >> Add a redirect

How To Increase The max_input_vars Value From DigitalOcean Cloud Server

How to increase the max_input_vars value from DigitalOcean Cloud Server

You can try increase default value of max_input_vars via htaccess for DigitalOcean Cloud Server

php_value max_input_vars 2000

if you got 500 error, you should use following

<IfModule mod_php5.c>

 php_value max_input_vars 2000

</IfModule>

More methods can be checked by following link

How to Increase max_input_vars

How Can I Increase The max_input_vars Value From A Small Orange Server

How can I increase the max_input_vars value from A Small Orange Shared Hosting

You can try increase the default value of max_input_vars via htaccess for your A Small Orange shared hosting.

php_value max_input_vars 2000

if you got 500 error, you should use following

<IfModule mod_php5.c>

 php_value max_input_vars 2000

</IfModule>

More methods can be checked by following link

How to Increase max_input_vars

Note: for Shared Hosting of A Small Orange, will requires a full copy of the server’s main php.ini for settings to be overridden. Please contact support of A Small Orange to get full copy of the server’s main php.ini

How To Increase The max_input_vars Value From Host1Plus Server

How to increase the max_input_vars value from Host1Plus Web Hosting

You can try increase default value of max_input_vars via htaccess for your Host1Plus Web Hosting via cPanel or DirectAdmin

php_value max_input_vars 2000

if you got 500 error, you should use following

<IfModule mod_php5.c>

 php_value max_input_vars 2000

</IfModule>

More methods can be checked by following link

How to Increase max_input_vars

After Successfully Install Magento 2, Admin URL Is Returning A 404?

After install Magento 2, could not access the admin url and its returning 404 error if open with /admin

Magento 2 makes a random url for the admin panel. After you successfully complete the setup you will see output like this:

Magento Admin URI: /admin_ggsm14

if you do not remember the admin random URL, You can find it in app/etc/env.php. following is the example
1.

'backend' =>  
  array (
    'frontName' => 'admin_ggsm14',
  ),

2. or you can get admin url via command

magento info:adminuri

A sample result like:

Admin Panel URI: /admin_ggsm14

Also, you have to make sure, you have enabled URL rewrites and check .htaccess file is exist. if you could not find .htaccess file, you can re upload from your installation file.