[CubeCart] How do I redirect 301 (dynamic urls)

Custom URLs and redirections.

[CubeCart] How do I redirect 301 (dynamic urls)

Postby VonHelvete » Mon Jun 02, 2008 4:14 pm

I just can't get the rewrite 301 to work along with the seo mod cause I know more or less nothing about Apache.
I have tried for 3 days now but I can't get it work.

If I want to do an internal redirect 301 for example
THIS: http://www.domain.se/view_product.php?product=N811 TO: http://www.domain.se/panos-bikini-20/pa ... ia-17.html

How should I write it and exactly where ? Need to do this on every single page from the old site to the new to keep my position in google and so on!
Would be more than grateful if anyone could help me ... 3 days of reading yes I have learned a lot but not this =) It's the dynamic urls that makes it impossible for me to get it working....

Ps. If it's unclear I have a old Cubecart store version 2 without seo mod that I need to redirect permanent to the new CC version 3 that have totally different url's but still on same domain and same products.

Thanks in advance! :geek:
VonHelvete
 
Posts: 4
Joined: Mon Jun 02, 2008 4:10 pm

[CubeCart] Re: How do I redirect 301 (dynamic urls)

Postby ~J~ » Mon Jun 02, 2008 4:30 pm

You will need to add following code for each link to the .htaccess file:

Code: Select all
RewriteCond %{QUERY_STRING} ^product=N811$
RewriteRule ^view_product.php$ index.php?act=viewProd&productId=17 [L,QSA]


Magic SEO URL then makes HTTP 301 redirects automatically.
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby VonHelvete » Tue Jun 03, 2008 8:16 am

Awesome! And it will be permanent 301 from the old site on all urls I do like this with?
Same principe for everything like categories, products, documents and so on ? Just change the "dynamic" value depending on what I redirect, right?
You rules Jiri! ;)
VonHelvete
 
Posts: 4
Joined: Mon Jun 02, 2008 4:10 pm

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby ~J~ » Tue Jun 03, 2008 8:21 am

VonHelvete wrote:Awesome! And it will be permanent 301 from the old site on all urls I do like this with?

Yes, it will.
VonHelvete wrote:Same principe for everything like categories, products, documents and so on ? Just change the "dynamic" value depending on what I redirect, right?

Right.
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby VonHelvete » Tue Jun 03, 2008 8:24 am

Awesome, but I must be stupid! Tried this on categories but it will not work?

Code: Select all
RewriteCond %{QUERY_STRING} ^cat_id=8$
RewriteRule ^view_cat.php$ index.php?act=viewCat&catId=30 [L,QSA]


What did I do wrong this time hehe ....
VonHelvete
 
Posts: 4
Joined: Mon Jun 02, 2008 4:10 pm

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby ~J~ » Tue Jun 03, 2008 9:25 am

This only works on web sites with Magic SEO URL installed. Please make sure your .htaccess file keep changes and is not overwritten.
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby VonHelvete » Tue Jun 03, 2008 9:57 am

Hi Jiri! Yeah I have magic seo for cubecart as you know =) (Tomas / Sweden)

How can I overwrite it and check that do you mean?
The product redirect works perfect but redirect categories nothing happens at all when I do as I stated above =/

Thanks mate!
VonHelvete
 
Posts: 4
Joined: Mon Jun 02, 2008 4:10 pm

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby ~J~ » Tue Jun 03, 2008 10:59 am

For categories use:

Code: Select all
RewriteCond %{QUERY_STRING} ^cat_id=X$
RewriteRule ^index.php$ index.php?act=viewCat&catId=Y [L,QSA]


X - old category ID
Y - new category ID
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby growlight » Thu Mar 04, 2010 7:19 pm

~J~ wrote:Please make sure your .htaccess file keep changes and is not overwritten.


Hey J!
How do I do that exactly...its been frustrating me for some time.
-Christopher
growlight
 
Posts: 3
Joined: Thu Apr 16, 2009 12:07 pm

Re: [CubeCart] How do I redirect 301 (dynamic urls)

Postby ~J~ » Fri Mar 05, 2010 9:34 am

Look to the code I have posted and only replace X and Y.
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Next

Return to Custom Rewrite Rules

Who is online

Users browsing this forum: No registered users and 1 guest

cron