Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2014
    Location
    Germany
    Posts
    95
    Plugin Contributions
    0

    Default 301 redirect problem

    I would like to 301 redirect from a product page to my external blog

    Code:
    RewriteCond %{QUERY_STRING} ^main_page=product_info&products_id=1176$
    RewriteRule ^index.php$ https://www.example.com/blog/new-destination/$ [L,R=301]
    Unfortunately it doesn't work. Here's the code which works internal in Zen-Cart:

    Code:
    RewriteCond %{QUERY_STRING} ^main_page=product_info&products_id=1176$
    RewriteRule ^index.php$ https://www.example.com/index.php?main_page=product_info&products_id=251/? [L,R=301]

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

    Default Re: 301 redirect problem

    Can't tell if there is any part of your query that you want to keep on the uri or not, but this will redirect to whatever page/directory that is on the right side of the rewriterule and remove the main_page aspect/part.

    Code:
    RewriteCond %{QUERY_STRING} ^main_page=product_info&products_id=1176$
    RewriteRule ^index\.php$ https://www.example.com/blog/new-destination/$1? [R=301,L]
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2014
    Location
    Germany
    Posts
    95
    Plugin Contributions
    0

    Default Re: 301 redirect problem

    Awesome :)

    little change - big effect

    Thank you very much!

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

    Default Re: 301 redirect problem

    Doesn't take much to mess it up. Takes a small change to make it work, which means it takes just a small change to break it. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. How to redirect a pseudo-static page using a 301 redirect ?
    By anahong in forum General Questions
    Replies: 1
    Last Post: 23 Jul 2010, 02:37 PM
  2. 301 Redirect
    By philip937 in forum General Questions
    Replies: 3
    Last Post: 16 Feb 2010, 05:55 PM
  3. Replies: 17
    Last Post: 14 Aug 2009, 06:14 PM
  4. Replies: 14
    Last Post: 2 Jul 2008, 03:40 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