Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Apr 2014
    Location
    London
    Posts
    22
    Plugin Contributions
    0

    Default htaccess redirect from old subdirectory site to new subdomain site

    hello

    I have an old version of zencart (1.3.8) in a subdirectory. The site is live: www.mydomain.com/zencart

    I have recently upgraded to 1.5.1 successfully and installed CEON URI mapping on the 1.5.1 test site in a subdomain : www.shop.mydomain.com and have uri mapped all the categories and products

    mydomain.com included some .shtml files which I now have put up as ezpages on shop.mydomain.com

    I want to redirect the old pages on mydomain.com/zencart to their equivalent pages in shop.mydomain.com. Eventually when testing is over I will move shop.mydomain.com to mydomain.com

    I've tried to redirect a couple of the old pages (which are still live) to see if it works, but I haven't managed to. I've included the following in the .htaccess of the root (mydomain.com/zencart)

    Code:
    RewriteEngine On 
    //301 Redirect Old File
    Redirect 301 /zencart/index.php?main_page=product_info&cPath=3_23&products_id=27 http://www.shop.mydomain.com/category-fruit/subcategory-apples/redapples?cPath=3_23&
    
    RedirectMatch 301 /zencart/index.php?main_page=index&cPath=3_23(.*)  http://www.shop.mydomain.com/category-fruit/subcategory-apples/$1
    None of this worked and I still get mydomain.com/zencart rather than shop.mydomain.com

    (Path 3 is category-fruit and path 23 is subcategory-apples, red apples are product 27 in the old version at mydomain.com/zencart). I kept the same categories/subcategories and products numbers on the new subdomain version shop.mydomain.com but now these have uri mapping. I'd like to be able to redirect the old unfriendly urls to the new uri mapped ones. I also have to redirect the old .shtml files to the ezpages. Also I'd like to prepare an .htaccess file for when I transfer from shop.mydomain.com to mydomain.com

    Can anyone help to point me in the right direction please?

    thanks
    Millie
    Last edited by Millie63; 28 May 2014 at 12:02 PM. Reason: code tags

 

 

Similar Threads

  1. v151 Need to redirect from old site links (including search engine links) too new site
    By swdynamic in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 15 Jun 2015, 04:40 AM
  2. What do I need in .htaccess to redirect to my new site?
    By marvin in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 18 Mar 2013, 09:01 PM
  3. Redirect From Old Site To New Site
    By devlin in forum General Questions
    Replies: 4
    Last Post: 14 Mar 2012, 01:25 PM
  4. v150 Redirect from old osc site to new zc site?
    By DIHI in forum General Questions
    Replies: 2
    Last Post: 2 Feb 2012, 05:42 PM

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