Forums / General Questions / Already installed in root/zencart/ folder but want to view/access from root folder

Already installed in root/zencart/ folder but want to view/access from root folder

Views: 6,577

Results 1 to 20 of 24
20 Sep 2014, 2:54 AM
#1
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Already installed in root/zencart/ folder but want to view/access from root folder

Hi,

I have installed in /zencart/ folder and it works fine if you go
http://www.mysite.com.au/zencart

but I want public to see it from http://www.mysite.com.au/ leaving installation in the same existing folder /zencart

How?.. can you please explain commands (change htaccess file) or file changes in detail . Which method would be better in regards to SEO

Thanks

Downunder QLD

20 Sep 2014, 3:58 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

oavs:

Hi,

I have installed in /zencart/ folder and it works fine if you go
http://www.mysite.com.au/zencart

but I want public to see it from http://www.mysite.com.au/ leaving installation in the same existing folder /zencart

How?.. can you please explain commands (change htaccess file) or file changes in detail . Which method would be better in regards to SEO

Thanks

Change is made in cPanel. Expectation is that it is part of the domain name section, either a parked domain or something similar to assign your domainname to the subdirectory under your public_html directory.

Don't forget to change just the applicable information in the two configure.php files.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Sep 2014, 6:50 AM
#3
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Already installed in root/zencart/ folder but want to view/access from root folder

Isn't possible to make changes to the index.php file and then move it to the http://www.mysite.com.au/index.php ?

So that http://www.mysite.com.au/index.php will show what is stored in http://www.mysite.com.au/zencart / folder and show the site as normal?

I just need help here what should I be doing? I don't want just a redirect index.php ( http://www.mysite.com.au/index.php ? ) to http://www.mysite.com.au/zencart /

I want zencart index file in http://www.mysite.com.au/index.php to load http://www.mysite.com.au/zencart /

I am not sure that I am clear.

In a nutshell I want zencart in a folder called 'zencart' on my host account.

Downunder QLD

20 Sep 2014, 9:38 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

oavs:

Isn't possible to make changes to the index.php file and then move it to the http://www.mysite.com.au/index.php ?

So that http://www.mysite.com.au/index.php will show what is stored in http://www.mysite.com.au/zencart / folder and show the site as normal?

I just need help here what should I be doing? I don't want just a redirect index.php ( http://www.mysite.com.au/index.php ? ) to http://www.mysite.com.au/zencart /

I want zencart index file in http://www.mysite.com.au/index.php to load http://www.mysite.com.au/zencart /

I am not sure that I am clear.

In a nutshell I want zencart in a folder called 'zencart' on my host account.

Do you have any intention of having a website displayed if some goes to: https://www.mysite.com.au where the address bar shows https://www.mysite.com.au ? If yes, is it expected that the content presented is ZC?
Or are you saying that no matter what is entered the url that the user will see always displays to the guest with the folder zencart?

Okay, how about this: What is the reason that zencart must be in a folder? And explain the importance of the customer or site guest knowing that it is installed in a folder.
.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Sep 2014, 9:48 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

See. I'm rereading the original post and what has been suggested already fits the solution. Ifnot mistaken, from your side you want to always have a zencart in a folder, but from the customer's side there is no importance to where it is stored as long as it is possible to get to the ZC site. So enter domain name control in the cpanel. Thisisnt a index.php redirect thing, this is the host identifying from where on their fileserver the site https://www.mysite.com.au is loaded. Customer types https://www.mysite.com.au, server says: hey I know where that is. It is located on the server that has this zencart directory. And voila the site appears using and showing the address of https://www.mysite.com.au and yet the site is stored in a sub-directory.

Even with the above "discussion" my questions in the previous post still remain to be answered.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Sep 2014, 12:59 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Already installed in root/zencart/ folder but want to view/access from root folder

Like mc12345678's previous post, the easiest (and least intrusive) method is to use your host's cPanel to point your site's root to the /zencart folder. Just make sure to update your /includes/configure.php to change the DIR_WS_CATALOG and DIR_WS_HTTPS_CATALOG to / instead of /zencart/ and you should be good-to-go.

20 Sep 2014, 1:49 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

Also, it's always useful if you provide some sort of explanation as to why you want to do this kind of non-standard thing. I can't think of a rational reason to have Zencart in a subdirectory but point the main URL to the installation there without using a redirect.

20 Sep 2014, 2:18 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

stevesh:

Also, it's always useful if you provide some sort of explanation as to why you want to do this kind of non-standard thing. I can't think of a rational reason to have Zencart in a subdirectory but point the main URL to the installation there without using a redirect.

This has been discussed before as a way to over simplify upgrading (pointing the uri to a subdirectory instead of to the root of the possible location. The question as to why the OP is wanting this action is to see if there is some alternate reason identified such as a concern that previous links or rankings may be affected, etc... If this is a brand new site where those things haven't been established, then no further action is required. If they have been established then the suggestion would be to offer redirects from the old path to this new one, but carry on as has been described above. Of course if there is somme other reason, it would be suggested to discuss it.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Sep 2014, 2:48 PM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

mc12345678:

This has been discussed before as a way to over simplify upgrading (pointing the uri to a subdirectory instead of to the root of the possible location. The question as to why the OP is wanting this action is to see if there is some alternate reason identified such as a concern that previous links or rankings may be affected, etc... If this is a brand new site where those things haven't been established, then no further action is required. If they have been established then the suggestion would be to offer redirects from the old path to this new one, but carry on as has been described above. Of course if there is somme other reason, it would be suggested to discuss it.

Yup, I remember that discussion, but don't remember being much impressed by the argument.

21 Sep 2014, 1:52 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

stevesh:

Yup, I remember that discussion, but don't remember being much impressed by the argument.

Can respect that response. It is a little of a different way to handle things, but does seem tomake sense and still fit I think all of the various installation instructions withouthaving to pick and choose. Atleast if one looks past any mention of files "typically" being installed in the public_html directory. (Still true, but down one layer)

Not entirely sure of the down side to mapping the uri to the subdirectory as long as one doesn't go crazy with other random settings that could cause some sort of negative effect. But, would still begood to hear back about the above requests. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 Sep 2014, 4:34 AM
#11
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Already installed in root/zencart/ folder but want to view/access from root folder

Answer to your last question is this and I am sure many would agree and would like to know how.

If was to setup Zencart and design , configure etc for a customer before going 'a live' ,

  1. I could set up the zencart in a folder named [/zencart] at the http://www.mysite.com.au/zencart
  2. Give the URL to the customer to make comments etc as it is developed to the final stage
  3. When the site is finalised and get paid fully from the customer for the job release the site to the root domain like http://www.mysite.com.au/index.php but leave the content of the site at /zencart

...other users might have different reasons. Who knows what their reason is. It is the solution we can't find.

I was able to do this simple by inserting a line in a blank htaccess file after doing further search elsewhere.

#htaccess file content
DirectoryIndex dog/index.php dog/index.html dog/index.htm

=========================
Above works for the home page fine without removing the /zencart folder.

Addition to above htaccess what really would have like to do (like I can in WordPress) is to hide the folder name ' /zencart ' from all the URLs. That would be then fantastic.

Then all the URLs would be http://www.mysite.com.au/index.php?main_page=product_info&cPath=2&products_id=526 rather than http://www.mysite.com.au/zencart/index.php?main_page=product_info&cPath=2&products_id=526

After so many posts relative to this issue all I can find as an answer is 'Why would you want to do that?' .

Downunder QLD

21 Sep 2014, 6:31 AM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

oavs:

Answer to your last question is this and I am sure many would agree and would like to know how.

If was to setup Zencart and design , configure etc for a customer before going 'a live' ,

  1. I could set up the zencart in a folder named [/zencart] at the http://www.mysite.com.au/zencart
  2. Give the URL to the customer to make comments etc as it is developed to the final stage
  3. When the site is finalised and get paid fully from the customer for the job release the site to the root domain like http://www.mysite.com.au/index.php but leave the content of the site at /zencart

...other users might have different reasons. Who knows what their reason is. It is the solution we can't find.

I was able to do this simple by inserting a line in a blank htaccess file after doing further search elsewhere.

#htaccess file content
DirectoryIndex dog/index.php dog/index.html dog/index.htm

=========================
Above works for the home page fine without removing the /zencart folder.

Addition to above htaccess what really would have like to do (like I can in WordPress) is to hide the folder name ' /zencart ' from all the URLs. That would be then fantastic.

Then all the URLs would be http://www.mysite.com.au/index.php?main_page=product_info&cPath=2&products_id=526 rather than http://www.mysite.com.au/zencart/index.php?main_page=product_info&cPath=2&products_id=526

After so many posts relative to this issue all I can find as an answer is 'Why would you want to do that?' .

Must not have read all of the posts:

http://www.zen-cart.com/showthread.php?214647-Already-installed-in-root-zencart-folder-but-want-to-view-access-from-root-folder&p=1259083#post1259083

Summarizes exactly what needs to be done to display the web address without a folder name in the web address. The other side of it is if that is the expectation, then why develop it in the root directory to begin with?

The reason for the questions is to ensure that you are really getting the answer you need rather than just what you are asking for. So far of the three occasions that a suggestion has been made, so faru have said no and for no reason.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

2 Oct 2014, 11:38 PM
#13
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Already installed in root/zencart/ folder but want to view/access from root folder

mc12345678:

Summarizes exactly what needs to be done to display the web address without a folder name in the web address. The other side of it is if that is the expectation, then why develop it in the root directory to begin with?

EXACTLY!!!!

And THIS is the reason why everyone is asking the OP WHY DO YOU WANT TO DO THIS?? Not seeing the logic behind developing on some sub-folder then forcing the "live" URL to be a mask for this sub-folder..

Why not develop in a DEVELOPMENT environment/site, and PUSH the dev code to the live site as is recommended by nearly every Zen Cart vet, and is the standard dev process at nearly EVERY MAJOR CORPORATION worldwide who support software/systems.. This whole process as described by the OP doesn't appear to have any benefit or upside to it.. IJS

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Oct 2014, 4:43 AM
#14
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Already installed in root/zencart/ folder but want to view/access from root folder

DivaVocals:

EXACTLY!!!!

And THIS is the reason why everyone is asking the OP WHY DO YOU WANT TO DO THIS?? Not seeing the logic behind developing on some sub-folder then forcing the "live" URL to be a mask for this sub-folder..

Why not develop in a DEVELOPMENT environment/site, and PUSH the dev code to the live site as is recommended by nearly every Zen Cart vet, and is the standard dev process at nearly EVERY MAJOR CORPORATION worldwide who support software/systems.. This whole process as described by the OP doesn't appear to have any benefit or upside to it.. IJS
EXACTLY.

I see no point or compelling reason to develop a website in a "subdirectory" when the desired final URI path is different ("/" instead of "/zencart" in this case). Using different URI paths during development just complicates things.

Instead match the path and just use a different host / domain name. For example "mysite.local" when developing on a local computer / network or "devtest.mysite.com" when developing on the hosting provider (for the live website).

Moving files is FAST via SSH, cPanel, WSH, etc. Downtime while switching from the old to new files will take less than one minute (most cases). And if one has access to the web server's configuration files (and knows what they are doing), the downtime can be reduced to under a second (most cases).

But now that you are where you are... If the site is not yet indexed or ranked in SEs, I'd recommend using the instructions in the FAQ to move the installatiion.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

3 Oct 2014, 5:21 AM
#15
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Already installed in root/zencart/ folder but want to view/access from root folder

lhungil:

EXACTLY.

I see no point or compelling reason to develop a website in a "subdirectory" when the desired final URI path is different ("/" instead of "/zencart" in this case). Using different URI paths during development just complicates things.

Instead match the path and just use a different host / domain name. For example "mysite.local" when developing on a local computer / network or "devtest.mysite.com" when developing on the hosting provider (for the live website).

Moving files is FAST via SSH, cPanel, WSH, etc. Downtime while switching from the old to new files will take less than one minute (most cases). And if one has access to the web server's configuration files (and knows what they are doing), the downtime can be reduced to under a second (most cases).

But now that you are where you are... If the site is not yet indexed or ranked in SEs, I'd recommend using the instructions in the FAQ to move the installatiion.

and on this point moving databases is also FAST if your can take advantage of remote SQL connections and your SQL client software supports moving DBs from one host to another..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

6 Oct 2014, 10:09 PM
#16
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Already installed in root/zencart/ folder but want to view/access from root folder

Can you please kindly point me to a link to find out how I can setup zencart DEVELOPMENT environment/site?

Downunder QLD

6 Oct 2014, 11:48 PM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

oavs:

Can you please kindly point me to a link to find out how I can setup zencart DEVELOPMENT environment/site?

Well, basically it's like installing the original cart, or transferring the cart to another location (another server or another folder), so for themost part all of the instructions used to create your first cart. That said, there is some guidance in settingg up an apache server and the other tools to run your site on a local computer. Once you setup the support software, then the above still applies.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

7 Oct 2014, 4:41 PM
#18
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Already installed in root/zencart/ folder but want to view/access from root folder

oavs:

Can you please kindly point me to a link to find out how I can setup zencart DEVELOPMENT environment/site?

Setup a sub-domain. If you are not sure how to do this, then contact your host with help doing this..
Setup a DB for your test/dev site
Install Zen Cart into your subdomain's root folder, use the test/dev DB you created for the DB..
When ready to "promote" your dev/test site to your live site you will need to FTP the files from the dev site to your live site

Now I personally use Beyond Compare to do the file transfer work because it has an FTP client allows me to see/highlight/compare the differences between the dev/live site and merge those changes in or make wholesale FTP file overwrites where I need to.

If the host allows remote SQl access, I use SQLYog to connect to the live and dev DB to update the live DB from the dev DB.. However, I only do this if I am doing an initial push from dev to live. For module SQL installs I simply do those SQL updates direct on the live site.

Bottomline is you need to be organized and BACKUP BACKUP BACKUP!!! Your current process provides no real benefit as it does not provide any safeguards against borking the live site nor is it a recommended practice when upgrading Zen Cart..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Oct 2014, 11:37 PM
#19
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Already installed in root/zencart/ folder but want to view/access from root folder

Ok Thank you for the good advise. I found a easier way may not be the developers ideal way.

For design/template.file customization changes

  1. Duplicated the site on the server in a sub directory/folder
  2. Make changes in the config file that is in the sub folder to reflect the sub folder location
    leave rest as is as same database /user/paswrd will work

For any database changes

  1. Duplicate database in MySql change database name to xxxx_01

  2. Make changes in the config file that is in the sub folder to reflect the xxxx_01 database name
    leave rest as is as same user/paswrd will work

  3. Then copy of the edited /added files/images that work from sub folder to root site folder.

  4. Make similar changes to mysql files if any.

Downunder QLD

7 Oct 2014, 11:49 PM
#20
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Already installed in root/zencart/ folder but want to view/access from root folder

oavs:

Ok Thank you for the good advise. I found a easier way may not be the developers ideal way.

For design/template.file customization changes

  1. Duplicated the site on the server in a sub directory/folder
  2. Make changes in the config file that is in the sub folder to reflect the sub folder location
    leave rest as is as same database /user/paswrd will work

For any database changes

  1. Duplicate database in MySql change database name to xxxx_01

  2. Make changes in the config file that is in the sub folder to reflect the xxxx_01 database name
    leave rest as is as same user/paswrd will work

  3. Then copy of the edited /added files/images that work from sub folder to root site folder.

  4. Make similar changes to mysql files if any.

Be sure to remember/recognize that changing anything on the admin panel has the same effect in this backup/developer site as it does on the production site, also that the admin log will be populated through accessing both admin panels, and any plugin that writes to the database based on administrative action will be duplicated to an extent. Product development, image updating, and several other "standard" functions have the potential of effecting the opposite site.

All, because a separate database is not/was not first setup which ideally should not contain the private information of guests as when/if that database is deleted it should be deleted by the host to ensure that sales data is not compromised and to also reduce the liability of access to the data during normal use as now there aare two access points to the same data where before there was only one.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...