Forums / General Questions / Remove sub-domain access from Addon Domain

Remove sub-domain access from Addon Domain

Started by spawnie69 on 1 Mar 2012, 2:45 AM · Views: 1,863

Results 1 to 6 of 6
1 Mar 2012, 2:45 AM
#1
spawnie69 avatar

spawnie69

Totally Zenned

Join Date:
Sep 2005
Location:
Ocala, FL
Posts:
527
Plugin Contributions:
0

Remove sub-domain access from Addon Domain

Hello Everyone,
I have a Bluehost account and have setup a couple of Zen cart store for clients.
My concern is how add on domains would appear to users and search engines.

For example let’s say:
My domain is https://www.markets.com

My client’s shops are https://www.clientshop1.com and https://www.clientshop2.com but as add on domains using Bluehost they appear to the user when actually using the site as https://www.markets.com/clientshop1 and https://www.markets.com/clientshop2.
So it appears as sub domains even though they are add on domains.

I found out that by altering the htaccess file with some code will enable the site not to show them as sub domains.
I read people doing this worked ok, but I am not sure if it would be ok with Zen Cart.
Here is the link explaining how:
http://www.fayazmiraz.com/remove-subdomain-access-from-addon-domain/

What I would like to know is if anyone tried this with a Zen cart on Bluehost successfully?
If not what would be the right approach.
Greatly appreciated as always!

Zen Cart ROCKS!

1 Mar 2012, 3:48 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Remove sub-domain access from Addon Domain

If you set your HTTP_SERVER to clientshop1.com and your DIR_WS_CATALOG to / and your DIR_FS_CATALOG to public_html/clientshop1 then it should work just fine by visiting https://www.clientshop1.com, invisible to the visitor ... assuming the addon domains are properly configured by the hosting company.
Same with clientshop2.

No need for .htaccess junk

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Mar 2012, 4:59 PM
#3
spawnie69 avatar

spawnie69

Totally Zenned

Join Date:
Sep 2005
Location:
Ocala, FL
Posts:
527
Plugin Contributions:
0

Re: Remove sub-domain access from Addon Domain

DrByte:

If you set your HTTP_SERVER to clientshop1.com and your DIR_WS_CATALOG to / and your DIR_FS_CATALOG to public_html/clientshop1 then it should work just fine by visiting https://www.clientshop1.com, invisible to the visitor ... assuming the addon domains are properly configured by the hosting company.
Same with clientshop2.

No need for .htaccess junk

Ok. I tried it with the following lines:

define('HTTP_SERVER', 'clientshop1.com');
define('HTTPS_SERVER', 'https://www.markets.com'); (this is my main account w/ ssl would this correct?)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/clientshop1/');
define('DIR_FS_CATALOG', 'public_html/clientshop1');
This line used to be the following:
define('DIR_FS_CATALOG', '/home8/markets/public_html/clientshop/');

After these changes I typed clientshop1.com and got the Hello. Thank you for loading Zen Cart™. page.
I could not do anything else. I know I must of messed up something. I think it's an SSL issue? Not sure. What do you think?
Thank you.

1 Mar 2012, 5:49 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Remove sub-domain access from Addon Domain

spawnie69:

define('DIR_FS_CATALOG', 'public_html/clientshop1');
This line used to be the following:
define('DIR_FS_CATALOG', '/home8/markets/public_html/clientshop/');

No, it should be:
define('DIR_FS_CATALOG', '/home8/markets/public_html/clientshop/');

... or replace 'clientshop' with 'clientshop1' or whatever folder the store is actually in.

I didn't mean to imply removing the stuff before the "public_html" part.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Apr 2012, 1:44 PM
#5
spawnie69 avatar

spawnie69

Totally Zenned

Join Date:
Sep 2005
Location:
Ocala, FL
Posts:
527
Plugin Contributions:
0

Re: Remove sub-domain access from Addon Domain

DrByte:

No, it should be:
define('DIR_FS_CATALOG', '/home8/markets/public_html/clientshop/');

... or replace 'clientshop' with 'clientshop1' or whatever folder the store is actually in.

I didn't mean to imply removing the stuff before the "public_html" part.

Thanks so much for the help! It worked like a charm.
This may sound like a dumb question...I am sharing my ssl with my clientshops so I guess there is no way to hide my domain from the ssl pages is there?

Thanks DrByte!

17 Apr 2012, 8:45 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Remove sub-domain access from Addon Domain

No. That's the way a shared certificate works.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.