Bryan_TAO Posted January 20, 2018 Share Posted January 20, 2018 Hi folks .... I started putting together a Webstore in a folder called /Cubecart and hadn't realised just how much valid work I had done on behalf of my client before wanting to change the root folder name. I have taken a copy of this folder and then uploaded again as /theclientsname and everything seems to work just fine .... the cart is using the same DB and the DB has not been moved or renamed. QUESTION: Have I created any problems ahead of me by doing this? If there's any doubt to the stability of the install now then I'd rather start again and install / setup the prog in the client's folder from scratch. But if it's not necessary I can save myself some work! Thank you. Bryan. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 20, 2018 Share Posted January 20, 2018 CubeCart does a very good job of figuring out where it is. One file you will want to make a change to is the .htaccess file. There are two directives that CubeCart will not adjust if the installation changes: RewriteBase and ErrorDocument 404. Quote Link to comment Share on other sites More sharing options...
Bryan_TAO Posted January 20, 2018 Author Share Posted January 20, 2018 What is the purpose of the RewriteBase folder please? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 20, 2018 Share Posted January 20, 2018 In the .htaccess file (a collection of directives for the web server): <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /subfolder The first directive starts processing the following group of directives if the web server (Apache?) has loaded the URL Rewrite functions. If so, the second directive tells the web server to activate those URL Rewrite capabilities. The third directive tells the web server that URLs of the form: www.website.com/subfolder/friendly-cat-name/friendly-subcat-name/friendly-product-name.html that /subfolder is not part of the overall SEO-friendly name of the page. Thus, when rewriting the URL - the final directive of the group - the /subfolder part stays as part of the legitimate URL, and the web server starts looking for /subfolder/index.php. Without the RewriteBase directive, or an incorrect value, the rewriting will include /subfolder as part of the SEO-friendly name, or will be looking for index.php in the wrong folder.. Quote Link to comment Share on other sites More sharing options...
Bryan_TAO Posted January 20, 2018 Author Share Posted January 20, 2018 Many thanks for your in depth explanation... Quote Link to comment Share on other sites More sharing options...
Noodleman Posted January 21, 2018 Share Posted January 21, 2018 Also, dont' forget to change the store URL found in store settings -> SSL. 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.