Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2009
    Posts
    32
    Plugin Contributions
    0

    Default Redirect some pages

    i want to redirect these pages
    http://www.site.com/index.php?main_page=page_1
    http://www.site.com/index.php?main_page=page_2
    http://www.site.com/index.php?main_page=page_3
    ...
    to the page
    http://www.site.com/index.php?main_page=about_us

    PS: i'm running zen cart 1.50 + seo mod, the urls are look like this http://www.site.com/page_1, http://www.site.com/about_us

    i tried
    redirect 301 http://www.site.com/index.php?main_page=page_1 http://www.site.com/index.php?main_page=about_us
    or
    redirect 301 http://www.site.com/page_1 http://www.site.com/about_us
    or
    RewriteCond %{HTTP_HOST} ^www.site.com$ [NC]
    RewriteCond %{QUERY_STRING} ^main_page=page_1$ [NC]
    RewriteRule ^/index\.php$ http://www.site.com/index.php?main_page=about_us [R=301,NE,NC,L]

    all of them don't work

    is there any way to redirect these pages?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Redirect some pages

    Just turn off those pages

  3. #3
    Join Date
    Oct 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Redirect some pages

    what do i turn off them?

    do you mean from admin define page status? but i have already set to Link OFF, Define Text OFF

    but if i enter the url http://www.site.com/index.php?main_page=page_1, it still goes to this page

    i used to use these pages to introduce sth, now i don't want to use them anymore, but many visitors go to those pages, then i want to redirect them
    Last edited by quick1; 12 Sep 2012 at 11:10 PM.

  4. #4
    Join Date
    Oct 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Redirect some pages

    what i want is not only turn off the text and link in sidebox, but also turn off these pages, i want to redirect these pages to about_us

    i thought perhaps i could redirect them by modifying the hearder_php file or tpl file, but i have a lot of define pages to redirect, i guess it's better add the 301 redirect to .htaccess ?
    Last edited by quick1; 13 Sep 2012 at 06:21 AM.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Redirect some pages

    This redirect in .htaccess would probably work (since you said you're already using rewritten URLs):
    Code:
    redirect 301 /page_1 http://www.site.com/index.php?main_page=about_us

    Quote Originally Posted by quick1 View Post
    i have a lot of define pages to redirect
    What's the history behind suddenly needing to redirect a lot of pages?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 HTTPS on entire site - getting some redirect issues
    By welshop.com in forum General Questions
    Replies: 7
    Last Post: 28 Mar 2016, 11:31 AM
  2. v139h redirect pages using .htaccess
    By shags38 in forum General Questions
    Replies: 1
    Last Post: 20 Mar 2014, 04:56 PM
  3. redirect pages
    By mipavluk in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Feb 2008, 08:38 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