Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Moved to new webhost, how do i remove the IP from the URL?

Moved to new webhost, how do i remove the IP from the URL?

Locked

Views: 1,357

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
25 Feb 2009, 10:07 AM
#1
boinkit avatar

boinkit

New Zenner

Join Date:
Aug 2007
Location:
England
Posts:
65
Plugin Contributions:
0

Moved to new webhost, how do i remove the IP from the URL?

I have just moved webhost and have moved an existing zencart install over (using the guidelines in this forum).
The store appears as it should and all works well, however the URLs shown are not as they were before.
So for example they used to be: https://www.domain.com/ they are are now 195.68.x.x./~username

I have repointed the domain to the new nameservers, but I don't know how to remove my webspace IP address and username from the store's URL.

I went into configure.php and changed the setting for the HTTP address (which was the temporary IP address) to give the store's domain name but this only led to the CSS being lost and the page was just full of text.

Can anyone help me complete this move over, which until now had been very smooth?

25 Feb 2009, 10:54 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Moved to new webhost, how do i remove the IP from the URL?

post your configure.php files here, without the password

25 Feb 2009, 11:04 AM
#3
boinkit avatar

boinkit

New Zenner

Join Date:
Aug 2007
Location:
England
Posts:
65
Plugin Contributions:
0

Re: Moved to new webhost, how do i remove the IP from the URL?

<?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://195.62.28.203'); define('HTTPS_SERVER', 'https://195.62.28.203'); // 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', '/~monkeyno/'); define('DIR_WS_HTTPS_CATALOG', '/~monkeyno/'); 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', '/home/monkeyno/public_html/'); 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', 'xxxxx'); define('DB_SERVER_PASSWORD', 'xxxx'); define('DB_DATABASE', 'xxxx'); 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', 'database'); define('DIR_FS_SQL_CACHE', '/home/monkeyno/public_html/cache'); // EOF
25 Feb 2009, 1:11 PM
#4
boinkit avatar

boinkit

New Zenner

Join Date:
Aug 2007
Location:
England
Posts:
65
Plugin Contributions:
0

Re: Moved to new webhost, how do i remove the IP from the URL?

Just to clarify, the ip address that comes up is the one in the config file, not the part that i wrote in my original message.

The store is at monkeynose(dot)com if you would like to have a better look at what i mean about the URL showing the IP address.

25 Feb 2009, 7:21 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Moved to new webhost, how do i remove the IP from the URL?

boinkit:

define('HTTP_SERVER', 'http://195.62.28.203');
define('HTTPS_SERVER', 'https://195.62.28.203');

define('ENABLE_SSL', 'false');

define('DIR_WS_CATALOG', '/~monkeyno/');
define('DIR_WS_HTTPS_CATALOG', '/~monkeyno/');

If you're going to drop the IP and the ~username, remove both of those and put back your URL.

ie:```
define('HTTP_SERVER', 'http://YOUR_DOMAIN_HERE');
define('HTTPS_SERVER', 'https://YOUR_DOMAIN_HERE');

define('ENABLE_SSL', 'false');

define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

26 Feb 2009, 10:40 AM
#6
boinkit avatar

boinkit

New Zenner

Join Date:
Aug 2007
Location:
England
Posts:
65
Plugin Contributions:
0

Re: Moved to new webhost, how do i remove the IP from the URL?

Excellent! That works perfectly :D

Do I need to do the same with the configure.php file in the admin/includes folder?

Thanks again!

26 Feb 2009, 5:19 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Moved to new webhost, how do i remove the IP from the URL?

Yes ... Both files require similar edits. (remember the files are not entirely the same content, so don't copy-and-paste)