YnZs Posted June 29, 2016 Share Posted June 29, 2016 Hello Everyone! Version: 6.0.9 Skin: Mauris with a few tweaks I started noticing a few weeks ago, that the "Image" at the top center of the store (that appears on all pages) takes you to what I will refer as my 'Front Page' I'll elaborate, website is www.MyWebSite.com, to access the store it's www.MyWebSite.com/index.php So you're poking around the store looking at all the goodies, then go up and click on the image, it takes you to www.MyWebSite.com instead of www.MyWebSite.com/index.php I can't figure out how to fix/change this, but I think it's odd and it should just take you back to the cart's 'Homepage' A few days ago, I was doing some testing as I hadn't received any orders in awhile, I went to my 'Homepage' @ www.MyWebSite.com/index.php and clicked on a random 'Add to Basket' of an item, to my surprise, it took me to my 'Frontpage' www.MyWebSite.com. As a quick fix I attempted to just REMOVE completely the 'Add to Basket' button as maybe this is known issue and will be fixed in a patch and with my VERY basic coding skills, removed it, but it left a funny looking | below the price of the item, so I reverted everything back.... Today, I decided I was going to switch to another skin, see if all the buttons and everything worked correctly elsewhere, as maybe there is something I have done. I have the "Allow Customer to Change Skins" option set to YES, but something funny happens when I go to www.MyWebSite.com/index.php and it attempts to load another skin..... It DOES NOT load a NEW skin NOR does it load the 'Homepage'! It takes me to my 'Frontpage' @ www.MyWebSite.com!! As part of testing, I did go into my Admin side and changed the skin to a few different types (Foundation, Crosshatch, etc) and I'm having relatively the same problems... 'Add to Basket' takes you to 'Frontpage'... or even somehow manages to load the 'Frontpage' into a box on the 'Homepage' I do run 2 other online stores, they don't seem to be having any of these issues, so I'm sure it's something I have done. Though, the 2 other stores are running: Version: 5.2.4 Version: 5.2.14 Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 29, 2016 Share Posted June 29, 2016 I hear you say that www.example.com takes you to a page you own (your "Frontpage") but not to your CubeCart's "Homepage". However, www.example.com/index.php will take you to your CubeCart's "Homepage". This tells me the hosting environment for this site has a web server that is configured with a "default document list" where there is a name of a file in that list that is listed before index.php (thus, a higher priority), and that this file does exist. In a URL, not having specified an actual document to view (e.g., /index.php), the web server must look to its "default document list". It will serve the first found document in that list. Therefore, if index.html is earlier in the list than index.php, and index.html actually exists, then index.html is what will be served. The programming in CubeCart is not as strict as some would like, hence, many URLs found in CubeCart pages do not include the /index.php part. That leaves you in a quandary. Do you keep the "Frontpage", or abandon it by making index.php in the "default document list" in the web server configuration have a higher priority. Or you can delete/rename the index.html document. Quote Link to comment Share on other sites More sharing options...
YnZs Posted June 29, 2016 Author Share Posted June 29, 2016 6 minutes ago, bsmither said: Therefore, if index.html is earlier in the list than index.php, and index.html actually exists, then index.html is what will be served. What would be the harm in switching them? Other than www.MyWebSite.com instantly going to the Cart's 'Homepage' instead of my company's "Frontpage'? I'll give it a shot, I'll see what happens That's exactly what I did and that's exactly what happened, when I hit the refresh button on my 'Frontpage' it loaded the online store. Maybe I should just register another domain name? Also, my store doesn't have it's own folder... that was my mistake from way back in the day, would there be any hope at all the would work? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 29, 2016 Share Posted June 29, 2016 It is easy to move CubeCart to a sub-folder (www.example.com/store/), and also easy to get a sub-domain (store.example.com). With a subdomain, you can set a VHOST to specifically load index.php. Quote Link to comment Share on other sites More sharing options...
YnZs Posted June 29, 2016 Author Share Posted June 29, 2016 How about adding a line or 2 to the global.inc.php file? Something like: $glob['storeURL'] = 'http://www.MyWebSite.com/index.php'; Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 29, 2016 Share Posted June 29, 2016 Intelligent idea, however, at some places in CubeCart's code, there will be the concatenation of ['storeURL'] with "index.php?key=value". The result is a double index.php. Quote Link to comment Share on other sites More sharing options...
YnZs Posted June 29, 2016 Author Share Posted June 29, 2016 So here's what I did: went into the file management of my website host provider (Bluehost.com) Created a folder under the public_html called "mywebsitestore" Found the area where you can create sub-domains and made 'store.MyWebSite.com' and had it point to the folder public_html/mywebsitestore Found a list of all CubeCart's Files and folders and COPIED them (not move) to public_html/mywebsitestore Went to the browser and typed in store.MyWebSite.com, everything seems to work and the errors are gone Went to the area where website host provider has a record for where CubeCart originally installed and changed it to the new folder public_html/mywebsitestore So far so good, haven't found any issues yet, but, I'm going to keep the old install around for awhile to make sure it works Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 29, 2016 Share Posted June 29, 2016 I won't pretend to follow what you just did, but I'm wondering if you have set yourself up for Google warnings about duplicate content....... Quote Link to comment Share on other sites More sharing options...
YnZs Posted June 29, 2016 Author Share Posted June 29, 2016 Probably.... Changed my mind and MOVED all the CubeCart files from the root (public_html/) to a "Back up" folder of such... deleted the index.php & admin.php files.... Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 29, 2016 Share Posted June 29, 2016 I'll leave this thread as unresolved until you are satisfied with the results. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.