Post by ifyouseek » Wed Jun 30, 2010 3:20 am

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

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by ifyouseek » Wed Jun 30, 2010 5:47 am

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?

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by ifyouseek » Wed Oct 20, 2010 9:54 am

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.

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by Qphoria » Wed Oct 20, 2010 10:01 am

Yes..look up htaccess redirect 301. There should be plenty of examples for redirect

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ifyouseek » Wed Oct 20, 2010 11:19 am

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?

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by Qphoria » Wed Oct 20, 2010 11:50 am

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.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ifyouseek » Wed Oct 20, 2010 12:12 pm

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.

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by Qphoria » Wed Oct 20, 2010 12:26 pm

Then use a meta redirect:
http://www.webweaver.nu/html-tips/web-redirection.shtml (Method 2)

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ifyouseek » Wed Oct 20, 2010 12:38 pm

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/" );
?>

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by IOWA » Thu Oct 21, 2010 1:25 am

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.

New member

Posts

Joined
Fri Oct 15, 2010 2:35 am
Who is online

Users browsing this forum: No registered users and 56 guests