Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37
  1. #21
    Join Date
    Sep 2006
    Posts
    91
    Plugin Contributions
    0

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    Hi,
    I have question about rewrite my home page from http://mysite.com to http://www.mysite.com. How to write a code for 301 redirect. Please help.

  2. #22

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    having trouble 'seeing' what you are saying here. how would this be written so that the redirect would work correctly?

    #Redirects product page 187 to index
    RewriteRule ^index.php?main_page=product_info&cPath=65&products_id=187 http://www.example.com/ [R=301,L]

    Quote Originally Posted by g1smd View Post
    RewriteRule cannot 'see' query string data. It only sees the 'path part' of a URL, following the initial slash, up until the question mark.

  3. #23
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    Look at the code several posts back. It has very similar constructs to what you need to use here.

    Use a RewriteCond before the RewriteRule, and check the value of QUERY_STRING using a suitable pattern.

    The pattern matching in RewriteRule matches only the path part of a URL.

    That is, the pattern in RewriteRule sees only the emboldened part of the request:

    Code:
    www.example.com/some/path/to-a-file?parameter=value
    The preceding part can be checked by looking at HTTP_HOST using a RewriteCond.

    The following part can be checked by looking at QUERY_STRING using a RewriteCond.

  4. #24
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst


  5. #25

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    So would someone be willing to look at my site and tell me the exact code I need? This is all above my head and my SEO guy says this is a major problem for me that needs fixing and why my PR is totally gone. I get a 302 before the 404 on deleted items. I'm willing to hire for services. Please let me know :) Thanks! Amy

  6. #26
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    I'll bet you're using:
    Code:
    ErrorDocument 404
    http://www.example.com/index.php?main_page=page_not_found
    This MUST be changed to:
    Code:
    ErrorDocument 404 /index.php?main_page=page_not_found
    Look in the .htaccess file for this code.

    The ErrorDocument directive must NOT contain a domain name.

  7. #27
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    im so sorry but i have been studying this thread for some time now trying to redirect a dynamic page (/index.php?main_page=product_info&products_id=537) to my index page (well preferably to the replacement product if possible but index if this is too complicated) and i am very out of my depth

    im not using any seo mods to change urls, the only things i am using are rewrites for non www to www and index to root, but i can't for the life of me get the 301 redirect to work and i am trying to follow what you are saying about rewrite instead of redirect but again im really struggling, i dont know much about htaccess at all and im desperately trying to learn. is there anyway you could give a working example of what you are speaking about above please? i only have about ten products to redirect but they have pretty good rankings so i would like to redirect some of that back inot my site if possible.

    with regards to the non www to www code i have used, i struggled with getting it to work on my server and ended up having to contact them direct for the code as no others worked that i had come across so that is what im using, i dont know if this is the reason for the old product 301 to diff page isnt working?

    my htaccess is below:
    Code:
    RewriteEngine On
    
    #canonical redirect from non www to www
    RewriteCond %{HTTP_HOST} !^(www\.livvylou\.co.uk)?$
    RewriteCond %{REQUEST_URI} !^/admin [NC]
    RewriteRule (.*) http://www.livvylou.co.uk/$1 [R=301,L]
    
    # Index Redirect to root
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(html?|php)\ HTTP/
    RewriteRule ^index\.(html?|php)$ http://www.livvylou.co.uk/? [R=301,L]
    
    ErrorDocument 404 /index.php?main_page=page_not_found
    
    #redirect rss page to actual feed
    redirect 301 /rss.php http://www.livvylou.co.uk/feed/general/feed.xml
    
    #Redirect old products to index
    RewriteRule ^/index.php?main_page=product_info&products_id=537 http://www.livvylou.co.uk/ [R=301,L]
    any help at all would be very much appreciated.

  8. #28
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,044
    Plugin Contributions
    61

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    Quote Originally Posted by bonnit View Post
    im so sorry but i have been studying this thread for some time now trying to redirect a dynamic page (/index.php?main_page=product_info&products_id=537) to my index page (well preferably to the replacement product if possible but index if this is too complicated) and i am very out of my depth

    im not using any seo mods to change urls, the only things i am using are rewrites for non www to www and index to root, but i can't for the life of me get the 301 redirect to work and i am trying to follow what you are saying about rewrite instead of redirect but again im really struggling, i dont know much about htaccess at all and im desperately trying to learn. is there anyway you could give a working example of what you are speaking about above please? i only have about ten products to redirect but they have pretty good rankings so i would like to redirect some of that back inot my site if possible.

    with regards to the non www to www code i have used, i struggled with getting it to work on my server and ended up having to contact them direct for the code as no others worked that i had come across so that is what im using, i dont know if this is the reason for the old product 301 to diff page isnt working?

    my htaccess is below:
    Code:
    RewriteEngine On
    
    #canonical redirect from non www to www
    RewriteCond %{HTTP_HOST} !^(www\.livvylou\.co.uk)?$
    RewriteCond %{REQUEST_URI} !^/admin [NC]
    RewriteRule (.*) http://www.livvylou.co.uk/$1 [R=301,L]
    
    # Index Redirect to root
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(html?|php)\ HTTP/
    RewriteRule ^index\.(html?|php)$ http://www.livvylou.co.uk/? [R=301,L]
    
    ErrorDocument 404 /index.php?main_page=page_not_found
    
    #redirect rss page to actual feed
    redirect 301 /rss.php http://www.livvylou.co.uk/feed/general/feed.xml
    
    #Redirect old products to index
    RewriteRule ^/index.php?main_page=product_info&products_id=537 http://www.livvylou.co.uk/ [R=301,L]
    any help at all would be very much appreciated.
    Try something like this


    RewriteCond %{QUERY_STRING} products_id=537
    RewriteRule (.*) http://www.livvylou.co.uk/$1? [R=301,L]
    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  9. #29
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    AMAZING!!!!

    it worked, thank you SO much!

  10. #30
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,044
    Plugin Contributions
    61

    Default Re: I've deleted products. How do I redirect customers to new ones? or to search inst

    Quote Originally Posted by bonnit View Post
    AMAZING!!!!

    it worked, thank you SO much!
    Very welcome

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. How do I redirect old links to new products?
    By diamond1 in forum General Questions
    Replies: 5
    Last Post: 12 Oct 2013, 11:28 AM
  2. Replies: 1
    Last Post: 25 Feb 2013, 02:27 AM
  3. Replies: 7
    Last Post: 2 Sep 2011, 10:30 AM
  4. Redirect deleted, moved and discontinued products to the home page.
    By Podgeminster in forum General Questions
    Replies: 1
    Last Post: 15 Mar 2011, 02:11 AM
  5. I deleted ALL my banners, now I can't add new ones
    By adod in forum Basic Configuration
    Replies: 5
    Last Post: 13 Nov 2008, 01:29 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