[CubeCart] How do I redirect 301 (dynamic urls)
-
- Posts: 4
- Joined: Mon Jun 02, 2008 5:10 pm
[CubeCart] How do I redirect 301 (dynamic urls)
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!
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!
[CubeCart] Re: How do I redirect 301 (dynamic urls)
You will need to add following code for each link to the .htaccess file:
Magic SEO URL then makes HTTP 301 redirects automatically.
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.
-
- Posts: 4
- Joined: Mon Jun 02, 2008 5:10 pm
Re: [CubeCart] How do I redirect 301 (dynamic urls)
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!
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!
Re: [CubeCart] How do I redirect 301 (dynamic urls)
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.
-
- Posts: 4
- Joined: Mon Jun 02, 2008 5:10 pm
Re: [CubeCart] How do I redirect 301 (dynamic urls)
Awesome, but I must be stupid! Tried this on categories but it will not work?
What did I do wrong this time hehe ....
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 ....
Re: [CubeCart] How do I redirect 301 (dynamic urls)
This only works on web sites with Magic SEO URL installed. Please make sure your .htaccess file keep changes and is not overwritten.
-
- Posts: 4
- Joined: Mon Jun 02, 2008 5:10 pm
Re: [CubeCart] How do I redirect 301 (dynamic urls)
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!
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!
Re: [CubeCart] How do I redirect 301 (dynamic urls)
For categories use:
X - old category ID
Y - new category ID
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
Re: [CubeCart] How do I redirect 301 (dynamic urls)
~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
Re: [CubeCart] How do I redirect 301 (dynamic urls)
Look to the code I have posted and only replace X and Y.