Zen Cart Logo
Forums / General Questions / Redirect some pages

Redirect some pages

Views: 611

Results 1 to 5 of 5
12 Sep 2012, 9:04 PM
#1
quick1 avatar

quick1

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

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?

12 Sep 2012, 9:24 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Redirect some pages

Just turn off those pages

12 Sep 2012, 10:04 PM
#3
quick1 avatar

quick1

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

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

13 Sep 2012, 5:17 AM
#4
quick1 avatar

quick1

New Zenner

Join Date:
Oct 2009
Posts:
32
Plugin Contributions:
0

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 ?

13 Sep 2012, 6:01 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Redirect some pages

This redirect in .htaccess would probably work (since you said you're already using rewritten URLs):

redirect 301 /page_1 http://www.site.com/index.php?main_page=about_us

quick1:

i have a lot of define pages to redirect
What's the history behind suddenly needing to redirect a lot of pages?