mc12345678:
And unfortunately for some, there are those hosts that say: thou has no way as an end user to adjust the document root of the server as public_html is your document root, you have no access to a higher path/area,
Agreed, but it is very rare that anyone would need a doc_root at a level higher than public_html - I've never found a need for this in over 20 years of hosting (exect on my own servers/VPS servers, where a higher level can be used to greatly enhance some forms of security), but basically, this is a moot point that doesn't need to even be mentioned, let alone discussed.
mc12345678:
and if you decide to place the contents of your store in a sub-directory from public_html you will forever be forced to use some other process to ensure that customers arrive at that location as the "root" of your store.
NOT SO! I've yet to find a host where this isn't possible - Not only is it possible, but in many situations it is actually desired.
mc12345678:
The thing is here. The OP had previously hosted the site with this sub-directory is the domain,
This is pretty standard practice.
mc12345678:
continues to want that and the site is not supporting that arrangement and the host has not provided a solution that complies with that arrangement. So... from the OPs perspective the document root has always been public_html with the site provided from catalog as the first directory off of public_html...
What can I say? The OP has simply never had the site correctly set up - Well, he has, but only if he ever uses a single domain/site for the given host.
mc12345678:
As DrByte said, it worked before the host made a change and it was working in such a way that catalog was displayed in the browser as a sub-directory off of the domain name. If you are stating/giving a solution that will alter the uri that has been in existence and used for the site, the effects of such modification both "good" and bad should be explained to the OP. Otherwise, as has been provided give a solution that restores the web-facing operation back to what it was.
It is not my point to discuss any of the possible workarounds. I have already acknowledged that they exist. Let's leave it at that.
mc12345678:
Like I said, I didn't see how the document root could be used to necessarily force a visitor onto the web-facing catalog directory by way of entering just the domain name. And no such solution was described as it isn't possible without some form of rewrite/redirect based on the above two posts.
You are correct, but this is still a 'workaround' of an iincorrect document_root.
As it stands (for the OP) - his URL for his zencart site is always going to show /catalog/ - In some cases this is fine, if there are other files/software (eg, Wordpress) exists in the document root, and the zenstore is a subset of the wordpress site), but his zenstore isn't a subset of any other software - He has nothing in the document root (other than the .htaccess file to force a needless redirect to a folder, that should be the document root.
mc12345678:
I personally agree that a sub-directory in the uri (DIR_WS_CATALOG) is generally unnecessary if not in some ways harmful, but that is associated with a new install not an existing one of a relatively new store. Making a change at that point in the operation is something that should be planned not just done because a couple of people made it sound cool. :)
As I stated, I will never understand why people make it hard for themselves, and I strongly disagree with your statements that imply it can't be done right.
Lets look at a couple of examples... assume a person has a single hosting account with two different zencart stores - Based on what you are saying (and with full acknowledgement that a folder above public_html can't be used, then what will the folder structure be?
There are three possibilities:
/public_html/zenstore#1/
/public_html/zenstore#1/zenstore#2
In this scenario. and based on the claim that doc_root can''t be changed, there will need to be a .htaccess redirect placed in public_html for zenstore#2 and zenstore#2 will need the WS defines for the folder/
The URL for zenstore# look quites unprofessional - being in a folder of the domainname. IOW, a 'workaround' is needed.
/public_html/zenstore#1/
/public_html/zenstore#2/
This is very similar to scenario one, but now both stores/domains need a 'workaround' and the folder showing in the URL - There is effectively no 'root' for either domain.
Same as #2
/public_html/zenstore#1/
/public_html/zenstore#2/
... But this time, we have set the document_root for zenstore#1 to be /plublic_html/zenstore#1 and the document_root of zenstore#2 to be /public_html/zenstore#2
In this scenario, we don't need any .htaccess redirects in /public_html/ - From the server perspective, this folder doesn't even exist. We also don't need to include zenstore#x in any of the zencart server defines, nor do we need to set any zencart WS defines to refer to any folders. THese will all simply be the default "/"
The only place where zenstore#x will be defined in the zenconfig file, will be in the FS defines.
It really couldn't get any simpler than that.
Even with just a single store in a folder located off of the public_html/ folder - as is the OP's case (/catalog/ ) - The /catalog/ is superfluous and unprofessional if shown/used in the URL. It smacks of amateurism.
And if you think that this professional scenario can't be achieved "due to ISP/host limitations, then please contact me via PM, because I have a lot to teach you about host configurations.
FYI,
http://www.radiosailingshop.com.au/
http://girlbysea.com.au
Are two independent zencart sites for a customer with a single hosting account with a file structure
/public_html/radiosailing/
/public_html/girlbysea/
There are no redirects in place, no /folders/ in the zencart config files (other than the FS defines) - You can go to either site, and no 'folders' are shown in the URL (one would expect http/domainname1.com/radiosailing/ and http://domainname#2/girlbysea/ unless a rewrite were used. The 'magic' that makes this work, with no redirects, and no /folders/ shown is simply because the document_root for the radiosailing domain is set to /public_html/radiosailing/ and the document_root for girlbysea is set to /public_html/girlbysea/
I have yet to find a host where this configuration isn't possible. I/we even have a policy these days that all sites we setup/host actually use a document_root one folder deeper than /public_html/ - It makes no difference to the webserver (which will always use the correct 'root' for any given domain for any given customer). but it makes a huge difference in regards to the file structure and ease of adding other domains for the same customer account.
Hopefully, this all makes sense to you (I suspect it doesn't though), else you wouldn't be making statements that imply that this isn't possible with all hosts. It is possible, and where one icould have been difficult, the cPanel (that most hosts use these days) makes it trivial.
BTW, I hate cPanel - It allows people without a clue the ability to set up their own 'hosting business'. (I'm not suggesting that you are one of these people) but without Cpanel (or should I say WHM) most hosting providers these days wouldn't even exist.
Cheers
RodG