Page 1 of 1
Redirecting all cart pages to www.newdomain.com/
Posted: Wed Jun 30, 2010 3:20 am
by ifyouseek
Hey every1, i have 2 shops, one i have stopped selling from (over a year old) and one(a lot newer and ranking lower) that has been active for the past few months.
I would like to create a .htaccess file that redirects any page or directory of domain.com to newdomain.com
The best i could manage was to redirect domain.com/page to newdomain/page, this isn't what i need. Any help would be great.Thanks
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Jun 30, 2010 5:47 am
by ifyouseek
Would deleting the cart and put a redirect on the 404 page work, it think it might but it isnt the correct way.
Does anyone have any thoughts?
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Oct 20, 2010 9:54 am
by ifyouseek
Anyone any ideas, i'm still intrested in finding out about this.
I want to redirect all opencart pages to the root of a new domain using the htaccess or should this just be done inserting a redirect in the header of the template.
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Oct 20, 2010 10:01 am
by Qphoria
Yes..look up htaccess redirect 301. There should be plenty of examples for redirect
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Oct 20, 2010 11:19 am
by ifyouseek
hey, theres a lot of info out there but just not what i needed, tried things out with no success. there prob is a way to do it with htaccess but i can't find it.
I thinka simple php redirect in the header of the cart would do exactly what i needed but am yet to try it. It would just redirect any page with the header to the new domain, that would work, wouldn't it?
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Oct 20, 2010 11:50 am
by Qphoria
I don't think you are applying yourself. The first link google returns shows:
Code: Select all
Redirect 301 / http://newsite.com/
Enter that into your htaccess and be done.
This is the exact same method I use to redirect from my
http://unbannable.com/ocstore site to my new site.
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Oct 20, 2010 12:12 pm
by ifyouseek
Hey, i tried this. not really what i need! Sorry i seem stupid but with this, i am. All i can do is work by trial and error.
When using the above,
http://oldsite.com/product will point to
http://newsite.com/product. Visit
http://unbannable.com/ocstore/anything to see what i mean! I want all old links to point to the homepage of the new shop.
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Oct 20, 2010 12:26 pm
by Qphoria
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Wed Oct 20, 2010 12:38 pm
by ifyouseek
i think i will try this code i've used to redirect single pages in the header.
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location:
http://newdomain.com/" );
?>
Re: Redirecting all cart pages to www.newdomain.com/
Posted: Thu Oct 21, 2010 1:25 am
by IOWA
ifyouseek wrote:i think i will try this code i've used to redirect single pages in the header.
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location:
http://newdomain.com/" );
?>
Just throw this at the VERY TOP of index.php and your good to go.