Zen Cart Logo
Forums / General Questions / Forwarding from old shop to new?

Forwarding from old shop to new?

Locked

Views: 3,440

Results 21 to 22 of 22
This thread is locked. New replies are disabled.
13 Dec 2008, 1:18 PM
#21
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Forwarding from old shop to new?

Yellow1912 is correct

The above code works only in case you change your domain name and still have the same folder structure,, and you want to redirect customers to new domain. Your situation is different, you are on the same domain, you changed your folder structure, you can try my suggested code to see if it does what you want.

I am glad you got it worked out.

13 Dec 2008, 5:53 PM
#22
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Forwarding from old shop to new?

With a little tweaking, this is now working correctly in all cases for a site moved from subfolder to root:```php

<?php // index.php on old site // Get the requested page and redirect to new site url // for moving site from folder to root // from skipwater - yellow1912 - gjh42 20081213 $qstring = ($_SERVER['QUERY_STRING'] != '') ? 'index.php?'.$_SERVER['QUERY_STRING'] : ''; header('HTTP/1.1 301 Moved Permanently'); header('Location: http://www.futurelics.com/'.$qstring); ?>