How to create multi store on subdomain without Cpanel?
Posted: Mon Dec 05, 2016 12:04 am
Hi
I'm trying to create a multi store shop (using OC 2.3.2) and I've followed a bunch of different tutorials and all of them are quite straight forward if your webhost is utilizing CPanel. My provider (one.com) doesn't have CPanel and the only way I generate a subdomain is to create a new folder into the root directory. There is no problem accessing the subdomain which I have verified by putting a simple .html file into the subdomain folder.
From the tutorials I can understand that the subdomain shall point to the directory were OpenCart is located, but I just don't know how to do it since CPanel isn't available for me? My webhost suggested to use the .htaccess and 301 redirect, but that's just a simple redirection and didn't help much. Is there anyone who know how I should set up the .htaccess or what more I can tell my webhost to do for me? Maybe there is someone using CPanel who can post the .htaccess for the subdomain here?
I also found this method and tried is as well:
------------------------------------------------------------
Add the following to your “.htaccess” file:
#Modification start by Igor Chishkala. DO NOT DELETE OR SUB STORES STOP WORKING
RewriteCond %{REQUEST_URI} !^/your-folder-name-here/.*$
#Modification finished by Igor Chishkala. DO NOT DELETE OR SUB STORES STOP WORKING
Next, create a new file inside the folder and name it “index.php.” Here is a structure of this file:
<?php include('../index.php');
------------------------------------------------------------
But this only runs the index.php from the base domain and detects that there is nothing installed in subfolder and you will get the error message:
The requested URL /install/index.php was not found on this server.
As far as I've understood, you shouldn't need to add any files to the new subdomain folder so I suppose this isn't the correct way to do it?
Best Regards,
Daniel
I'm trying to create a multi store shop (using OC 2.3.2) and I've followed a bunch of different tutorials and all of them are quite straight forward if your webhost is utilizing CPanel. My provider (one.com) doesn't have CPanel and the only way I generate a subdomain is to create a new folder into the root directory. There is no problem accessing the subdomain which I have verified by putting a simple .html file into the subdomain folder.
From the tutorials I can understand that the subdomain shall point to the directory were OpenCart is located, but I just don't know how to do it since CPanel isn't available for me? My webhost suggested to use the .htaccess and 301 redirect, but that's just a simple redirection and didn't help much. Is there anyone who know how I should set up the .htaccess or what more I can tell my webhost to do for me? Maybe there is someone using CPanel who can post the .htaccess for the subdomain here?
I also found this method and tried is as well:
------------------------------------------------------------
Add the following to your “.htaccess” file:
#Modification start by Igor Chishkala. DO NOT DELETE OR SUB STORES STOP WORKING
RewriteCond %{REQUEST_URI} !^/your-folder-name-here/.*$
#Modification finished by Igor Chishkala. DO NOT DELETE OR SUB STORES STOP WORKING
Next, create a new file inside the folder and name it “index.php.” Here is a structure of this file:
<?php include('../index.php');
------------------------------------------------------------
But this only runs the index.php from the base domain and detects that there is nothing installed in subfolder and you will get the error message:
The requested URL /install/index.php was not found on this server.
As far as I've understood, you shouldn't need to add any files to the new subdomain folder so I suppose this isn't the correct way to do it?
Best Regards,
Daniel