Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Close and redirect store to new domain


jojoba007

Recommended Posts

Hi,

The following. My osCommerce store needs to be closed and redirected to a new store on a new domain.
What is the best way to close the store for searchengines and redirect the store to the new domain so SEO will be kept intact?
I still need to be able to enter the backend of the old osCommerce store on the old domain. The new store is a newer setup so it won't be a copy of the old store (so i think urls won't be an exact copy).
All products will be migrated to the new store.

Hope for some answers.

 

Link to comment
Share on other sites

If you still need to access the backend ("admin") of the old store, while redirecting visitors to the new store, I think it can be done. In your old store's /.htaccess file, assuming the store is in /shop/ and the admin is /shop/myAdmin/, (and the new store is in /store/) something like

RewriteEngine On
RewriteCond  %{REQUEST_URI}  ^/shop  [NC]
RewriteCond  %{REQUEST_URI}  !^/shop/myAdmin  [NC]
RewriteRule  ^shop(.*)$  https://www.newstore.com/store$1  [R=301,L]

should be a good start. Season to taste (http: vs https:, www. or not, etc.). This assumes your server supports .htaccess URL rewriting. On some servers you might have to do something different.

This assumes that you want to preserve all URLs from the old store into the new one. If the URL structure is different (e.g., different SEO), and visitors should simply go to the front door of the new store, change "store$1" to just "store".

Link to comment
Share on other sites

1 hour ago, MrPhil said:

If you still need to access the backend ("admin") of the old store, while redirecting visitors to the new store, I think it can be done. In your old store's /.htaccess file, assuming the store is in /shop/ and the admin is /shop/myAdmin/, (and the new store is in /store/) something like


RewriteEngine On
RewriteCond  %{REQUEST_URI}  ^/shop  [NC]
RewriteCond  %{REQUEST_URI}  !^/shop/myAdmin  [NC]
RewriteRule  ^shop(.*)$  https://www.newstore.com/store$1  [R=301,L]

should be a good start. Season to taste (http: vs https:, www. or not, etc.). This assumes your server supports .htaccess URL rewriting. On some servers you might have to do something different.

This assumes that you want to preserve all URLs from the old store into the new one. If the URL structure is different (e.g., different SEO), and visitors should simply go to the front door of the new store, change "store$1" to just "store".

Thank you very much for your reply.

All products will keep their SEO url. All other pages (like privacy page, contact page, etc) will be different. Then I think I should use the store$1 redirect and set the redirect for other pages individually?

Link to comment
Share on other sites

If it's a reasonable number of "other" pages to handle with redirects, and all the product and category stuff stays the same, that could work. Just make sure you do the "other" pages first, and the generic store$1 last.

Link to comment
Share on other sites

40 minutes ago, MrPhil said:

If it's a reasonable number of "other" pages to handle with redirects, and all the product and category stuff stays the same, that could work. Just make sure you do the "other" pages first, and the generic store$1 last.

Thanks.

So will it look something like this?

Etc...

And should this be placed in the top of the .htacces file?

 

RewriteEngine On
RewriteCond  %{REQUEST_URI}  ^/shop  [NC]
RewriteCond  %{REQUEST_URI}  !^/shop/myAdmin  [NC]

Redirect 301 https://www.somedomain.com/contactform https://www.newstore.com/contact
Redirect 301 https://www.somedomain.com/privacy https://www.newstore.com/privacypage

RewriteRule  ^shop(.*)$  https://www.newstore.com/store$1  [R=301,L]
Link to comment
Share on other sites

No, move the two RewriteConds after the two Redirects. Any further adjustments will depend on where the old and new stores are located (directory names) and what your old Admin is named. Whatever you have now in the .htaccess file may determine exactly where this is placed, so find someone who understands .htaccess and can advise you, before proceeding any further.

Link to comment
Share on other sites

19 hours ago, MrPhil said:

No, move the two RewriteConds after the two Redirects. Any further adjustments will depend on where the old and new stores are located (directory names) and what your old Admin is named. Whatever you have now in the .htaccess file may determine exactly where this is placed, so find someone who understands .htaccess and can advise you, before proceeding any further.

Thanks for your time an support so far!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...