Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default How can/should I best reroute links to NEW store directory

    I moved my store from root to a subdirectory and greatly improved my rebuild speed.
    We're now running 157b from 155f and added the Clone a Template plugin. All is working great.
    I'm reviewing Google Search Console and see I have more to do.

    How can I reroute links that are going to the OLD root directory and ending up on 404 pages.
    I'd hate to loose these referrals coming from forums and past customers.
    Is there a way to insert the new store directory VDSstore/ within any incoming link, say via .htaccess?

    vinyldecalsuperstore (.) com/INSERT_STORE_DIRECTORY_HERE/index.php?main_page=product_info&products_id=256

    Thank you.
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

  2. #2
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: How can/should I best reroute links to NEW store directory

    I did it! I added this to the end of my .htaccess file:

    RewriteBase /

    # Rewrites all URLS without VDSstore in them
    RewriteCond %{REQUEST_URI} !^/VDSstore/

    # Rewrites all URLS [Replace "example" with the actual domain, without the TLD (.com, .net, .biz, etc)]
    RewriteCond %{HTTP_HOST} ^(www\.)?vinyldecalsuperstore\.

    # Rewrite all those to insert /folder
    RewriteRule ^(.*)$ /VDSstore/$1 [L]
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

  3. #3
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: How can/should I best reroute links to NEW store directory

    To get this straight. In order to "improve" the rate of upgrading (something done maybe once a year) an existing store was moved from the root of a domain to some other location and all future visits are to be to this new sub-directory?

    Why not just move/make the root directory again the destination?

    Hope you don't have any other "tools" run off of the root of your store, because if so, then will need to be sure to redirect them to the appropriate location as well. This also includes your ssl certificate if you have one...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jun 2009
    Location
    Sparta, TN
    Posts
    158
    Plugin Contributions
    0

    Default Re: How can/should I best reroute links to NEW store directory

    Quote Originally Posted by mc12345678 View Post
    To get this straight. In order to "improve" the rate of upgrading (something done maybe once a year) an existing store was moved from the root of a domain to some other location and all future visits are to be to this new sub-directory?
    I did this partly because of the first two sentences in these directions https://docs.zen-cart.com/user/upgra...led_upgrading/. For me, it was much cleaner and easier to work with visually.

    Quote Originally Posted by MC12345678 View Post
    Why not just move/make the root directory again the destination?
    Not sure of the "pro" in going back to this now that I have the redirect?

    Quote Originally Posted by MC12345678 View Post
    Hope you don't have any other "tools" run off of the root of your store, because if so, then will need to be sure to redirect them to the appropriate location as well. This also includes your ssl certificate if you have one...
    I do have another domain and an SSL, both of which redirect properly. And for the first time, my SSL activates on my ADMIN login too. I hope I don't have any other "tools" either. I've kept my store at a minimum with only the clone a template in use. This maybe to my own detriment?

    I REALLY appreciate your concern for me and respect your feedback. After eleven (11) years, I still feel like a newbie (though this isn't quite the same as feeling young).
    Last edited by VDecalS; 28 Feb 2021 at 04:18 PM. Reason: I just became a Zen Follower! Yay me!
    My store - closed 12/05/2023
    1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.4.29 (Zend: 3.4.0)

 

 

Similar Threads

  1. should I add new table to store new field?
    By linjuming in forum General Questions
    Replies: 4
    Last Post: 21 Feb 2013, 06:35 PM
  2. Replies: 16
    Last Post: 15 Aug 2012, 12:40 PM
  3. Moved store to new directory, now can't log in as admin
    By AJ32 in forum General Questions
    Replies: 2
    Last Post: 17 Jul 2008, 08:24 AM
  4. Replies: 6
    Last Post: 24 Oct 2006, 03:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR