Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Sep 2008
    Posts
    397
    Plugin Contributions
    0

    Default How to redirect a product url to sub.domain?

    Hello Sir,

    Since this version causes some products descriptions not editable, and try to keep current good traffic on the web, I decided to redirect to new site in subdomain.

    How can I redirect a product from http:// url to a new url in https://sub.domain?

    Please help. Thanks in advance!

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How to redirect a product url to sub.domain?

    Why not do an upgrade of your software keeping all your existing links, ranking, etc...?

    https://www.zen-cart.com/entry.php?3...d-of-upgrading

    If you are going to go the path of redirecting all of your traffic to a sub-domain then you would need an htaccess (.htaccess) file that detects someone trying to access your site using www dot yourdomain dot com or the same without www and redirect to your subdomain. Seems kind of pointless though to redirect if you've already got a site that is working in the current environment. All that is needed is to move that site to your old location: http://www.zen-cart.com/content.php?...that-directory
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2008
    Posts
    397
    Plugin Contributions
    0

    Default Re: How to redirect a product url to sub.domain?

    Quote Originally Posted by mc12345678 View Post
    Why not do an upgrade of your software keeping all your existing links, ranking, etc...?

    https://www.zen-cart.com/entry.php?3...d-of-upgrading

    If you are going to go the path of redirecting all of your traffic to a sub-domain then you would need an htaccess (.htaccess) file that detects someone trying to access your site using www dot yourdomain dot com or the same without www and redirect to your subdomain. Seems kind of pointless though to redirect if you've already got a site that is working in the current environment. All that is needed is to move that site to your old location: http://www.zen-cart.com/content.php?...that-directory
    Thank you MC12345678,

    Upgrade from v1.39h to v1.5 is a big step for me, not only too much work but also there are many potential problem with my current template and modules concern. So I decided rebuild my site on a latest version.
    Last edited by hara; 29 May 2016 at 05:27 AM.

  4. #4
    Join Date
    Sep 2008
    Posts
    397
    Plugin Contributions
    0

    Default Re: How to redirect a product url to sub.domain?

    Hello Sirs,

    Is it possible, simply redirect product link to sub-domain product by using these two elements under product settings on old site?
    Products URL: to new site url
    URI Mapping:

    Please advise. Thanks in advance!

  5. #5
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How to redirect a product url to sub.domain?

    Quote Originally Posted by hara View Post
    Thank you MC12345678,

    Upgrade from v1.39h to v1.5 is a big step for me, not only too much work but also there are many potential problem with my current template and modules concern. So I decided rebuild my site on a latest version.
    If you in fact rebuilt using the latest version, then you basically have upgraded your site. The two documents linked above would allow you to have your guests continue to access your site the way they used to but using the latest software.

    When you said you rebuilt, did you export the database from your old site and import it into your new site or did you manually enter everything?

    The rewrite path(es) you suggested complicate things well beyond what you need to complete what you have begun.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Sep 2008
    Posts
    397
    Plugin Contributions
    0

    Default Re: How to redirect a product url to sub.domain?

    I manually enter everything. Did not export to New database.

    Thanks!

  7. #7
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How to redirect a product url to sub.domain?

    The solution that I would offer to maintain all things as they were under the new program code would be to create a third location for your site.

    This would include creating another database, as well as copying all of the files from your most recent rebuild. Then after the files are able to manage the third store, replace contents of the third database with your database from the original store, upload zc_install from the ZC version associated with the files, perform a database only upgrade. Check operation. If that works then would basically repeat that portion of the process on your original store (a little more to it as want to keep a copy of your old files but want to have only the files from your most recent version in that location). If there is any additional database code to be applied to the third database then take note of those actions and again replace the original store files and upgrade the database.

    Otherwise the "easy" way at which point all existing links/references would be lost would be to simply move all of the old files out of the way, place the new files in the directory using the second link that was provided above in post #2. Trying to remap all of the product from an old uri to a new one one at a time is a recipe for disaster and why the upgrade process suggested (at least from the database standpoint) is suggested/provided.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Sep 2008
    Posts
    397
    Plugin Contributions
    0

    Default Re: How to redirect a product url to sub.domain?

    Quote Originally Posted by mc12345678 View Post
    The solution that I would offer to maintain all things as they were under the new program code would be to create a third location for your site.

    This would include creating another database, as well as copying all of the files from your most recent rebuild. Then after the files are able to manage the third store, replace contents of the third database with your database from the original store, upload zc_install from the ZC version associated with the files, perform a database only upgrade. Check operation. If that works then would basically repeat that portion of the process on your original store (a little more to it as want to keep a copy of your old files but want to have only the files from your most recent version in that location). If there is any additional database code to be applied to the third database then take note of those actions and again replace the original store files and upgrade the database.

    Otherwise the "easy" way at which point all existing links/references would be lost would be to simply move all of the old files out of the way, place the new files in the directory using the second link that was provided above in post #2. Trying to remap all of the product from an old uri to a new one one at a time is a recipe for disaster and why the upgrade process suggested (at least from the database standpoint) is suggested/provided.
    Hi mc12345678,

    Thank you so much for the knowledge I learned.

    For temporary solution, use .htaccess 301 redirect will lose original traffic and ranking?
    Will Redirect by using SEO url causes any problem?

    Thanks in advance!

  9. #9
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How to redirect a product url to sub.domain?

    Quote Originally Posted by hara View Post
    Hi mc12345678,

    Thank you so much for the knowledge I learned.

    For temporary solution, use .htaccess 301 redirect will lose original traffic and ranking?
    Will Redirect by using SEO url causes any problem?

    Thanks in advance!
    301 is a permanent redirect. If want to temporarily redirect would want to use a 302.

    A majority of such uri rewriters are not intended to redirect the way that is being described. It can still be possible, but solving this issue using those methods will use more energy now (and in the future) to solve something that can be corrected now and for the future.

    If your site currently uses some form of uri rewriting then depending on which one has been used and what general information is out there as to what the impact of replacing the current store with the new manually entered database would be, but if you used your existing database to upgrade it, then the uris to the products should remain the same.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Sep 2008
    Posts
    397
    Plugin Contributions
    0

    Default Re: How to redirect a product url to sub.domain?

    I'm testing .htaccess redirect by adding this code:
    Redirect 301 /s-e-o-page http://www.yoursite.com/s-e-o-newpage

    But no page found in result because I can see that old site's fold added to new site's path as:
    http://www.yoursite.com/abcde/s-e-o-newpage

    Please advise. Thanks in advance!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to redirect image URL?
    By musicfreer in forum General Questions
    Replies: 4
    Last Post: 17 Jun 2011, 11:53 PM
  2. Replies: 5
    Last Post: 15 Dec 2010, 11:05 PM
  3. Replies: 3
    Last Post: 13 Dec 2010, 05:28 PM
  4. how do i redirect my second domain?
    By weber in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Mar 2009, 05:18 PM

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