Forums / General Questions / Login redirecting to "live" site instead...

Login redirecting to "live" site instead...

Locked

Views: 1,801

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
24 Aug 2008, 12:11 AM
#1
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Login redirecting to "live" site instead...

Hi everybody. I'm working on updating our Zen Cart website, but a problem has arisen.

First, our "live" site is here at the root of our site...

http://thewindcutter.com/

The new site we're working on is in a sub-directory here...

http://thewindcutter.com/shop/

I went to test the login/create account screen by clicking on "Log In" in the header. The link takes me to our live site here...

http://www.thewindcutter.com/index.php?main_page=login

instead of to our new site (getting close but not "live" yet)...

http://www.thewindcutter.com/shop/index.php?main_page=login

Anyone know how I can fix this? I'd appreciate it very much.

Thanks a lot,
Rebekah

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

24 Aug 2008, 12:32 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Login redirecting to "live" site instead...

Don't do any kind of redirect. Check your Zencart configure.php filles for the proper path info.

If you want to test the new login,

http://www.thewindcutter.com/shop/index.php?main_page=login

24 Aug 2008, 12:51 AM
#3
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Hi Stevesh, Thanks for the quick reply.

I have not purposely set up any redirects. I did try adding "shop" (no quotes, of course) to the config file in a couple places but that just messed it up so no images or styling was showing properly. So, I put it back the way it was. My first though was the configure.php file, I'm just not sure what to look for.

I can go to http://www.thewindcutter.com/shop/index.php?main_page=login and I see the login page there the way it should look but if I try to create an account it and click submit it takes me to the equivalent page on the "live" site instead of the "shop" (sub-directory) site.

Hope I'm making myself clear. Not sure what to do next.

Thanks,
Rebekah

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

24 Aug 2008, 1:11 AM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

24 Aug 2008, 1:26 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Login redirecting to "live" site instead...

I get an error when I create an account:

home2/rebekah/public_html/includes/templates/template_default/templates/tpl_create_account_success_default.php

Suggests to me you don't have the paths set up correctly. What is the home2/rebekah domain?

24 Aug 2008, 1:56 AM
#6
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Hi Kim,

So, are you saying that since I don't have SSL enabled then somehow my site located in the "shop" subdirectory is crossing over to the shop located in the root of my site?

I thought the problem is just one of an incorrect path in the configuration somewhere.

Hmm.

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

24 Aug 2008, 2:02 AM
#7
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

stevesh:

I get an error when I create an account:

home2/rebekah/public_html/includes/templates/template_default/templates/tpl_create_account_success_default.php

Suggests to me you don't have the paths set up correctly. What is the home2/rebekah domain?

http://thewindcutter.com is our domain.

That path is taking you to our current live site. That's the problem. Shouldn't it be taking you to the equivalent page in the sub-directory where my new shop is

i.e. /rebekah/public_html/shop/includes/templates/template_default/templates/tpl_create_account_success_default.php

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

24 Aug 2008, 3:23 AM
#8
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

I pointed you to the FAQ because there are examples of the configs. Please post your includes/configure.php Remove your password.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

24 Aug 2008, 3:43 AM
#9
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Kim:

I pointed you to the FAQ because there are examples of the configs. Please post your includes/configure.php Remove your password.

Thanks for your help, Kim.

Here's the /shop/includes/configure.php...

<?php
/**
 * @package Configuration Settings circa 1.3.8
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */


/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/

// Define the webserver and path parameters
  // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
  define('HTTP_SERVER', 'http://www.thewindcutter.com');
  define('HTTPS_SERVER', 'https://www.thewindcutter.com/shop');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/shop/');
  define('DIR_WS_HTTPS_CATALOG', '/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

  define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home2/rebekah/public_html/shop/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
  define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', '');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', '[I]REMOVED[/I]');
  define('DB_SERVER_PASSWORD', '[I]REMOVED[/I]');
  define('DB_DATABASE', '[I]REMOVED[/I]');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'db');
  // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'none'); 
  define('DIR_FS_SQL_CACHE', '/home2/rebekah/public_html/shop/cache');

// EOF

and here's /shop/admin/includes/configure.php...

<?php
/**
 * @package Configuration Settings circa 1.3.8
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */


/*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/

// Define the webserver and path parameters
  // Main webserver: eg-http://www.your_domain.com - 
  // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
  // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com
  /* 
   * URLs for your site will be built via:  
   *     HTTP_SERVER plus DIR_WS_ADMIN or
   *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or 
   *     HTTP_SERVER plus DIR_WS_CATALOG or 
   *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
   * ...depending on your system configuration settings
   *
   * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following:
   */
  define('HTTP_SERVER', 'http://www.thewindcutter.com');
  define('HTTPS_SERVER', 'https://www.thewindcutter.com/shop');
  define('HTTP_CATALOG_SERVER', 'http://www.thewindcutter.com');
  define('HTTPS_CATALOG_SERVER', 'https://www.thewindcutter.com/shop');

  // Use secure webserver for catalog module and/or admin areas?
  define('ENABLE_SSL_CATALOG', 'false');
  define('ENABLE_SSL_ADMIN', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_ADMIN', '/shop/admin/');
  define('DIR_WS_CATALOG', '/shop/');
  define('DIR_WS_HTTPS_ADMIN', '/admin/');
  define('DIR_WS_HTTPS_CATALOG', '/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
  define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_ADMIN', '/home2/rebekah/public_html/shop/admin/');
  define('DIR_FS_CATALOG', '/home2/rebekah/public_html/shop/');

  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', '');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', '[I]REMOVED[/I]');
  define('DB_SERVER_PASSWORD', '[I]REMOVED[/I]');
  define('DB_DATABASE', '[I]REMOVED[/I]');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'db');
  // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'none'); 
  define('DIR_FS_SQL_CACHE', '/home2/rebekah/public_html/shop/cache');

// EOF

Thanks again!

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

24 Aug 2008, 3:54 AM
#10
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

define('HTTP_SERVER', 'http://www.thewindcutter.com');
define('HTTPS_SERVER', 'https://www.thewindcutter.com');
define('HTTP_CATALOG_SERVER', 'http://www.thewindcutter.com');
define('HTTPS_CATALOG_SERVER', 'https://www.thewindcutter.com');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/shop/admin/');
define('DIR_WS_CATALOG', '/shop/');
define('DIR_WS_HTTPS_ADMIN', '/admin/');
define('DIR_WS_HTTPS_CATALOG', '/shop/');

Follow the pattern above for the Admin Config

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

24 Aug 2008, 3:58 AM
#11
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Thanks, Kim. I'll give that a try and report back.

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

24 Aug 2008, 4:12 AM
#12
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Well, that didn't work. If I go to

http://thewindcutter.com/shop/index.php (the new shop I'm working on)

and click on "Log In" now it takes me to our current live site (instead of the new shop I'm working on).

http://www.thewindcutter.com/index.php?main_page=login

Somewhere in the mix I suspect a "shop" (name of the sub-directory where the new shop is located) is missing.

:dontgetit

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

24 Aug 2008, 5:21 AM
#13
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Everywhere you have the URL in the configs (both of them) you need the shop directory - check both configs and follow the example from my post above.

Make sure you make the files writable for editing then reset the permissions afterwards.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

25 Aug 2008, 10:49 PM
#14
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Login redirecting to "live" site instead...

Thanks to Barco57 (who works with Merlinpa at Camelot, where my site is hosted) he fixed my configs right up.

I have copies of the old and fixed ones if anyone needs to see the fix.

Thanks everybody. :clap:

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *