zalik22 Posted April 2, 2006 Posted April 2, 2006 Hi, I am a newbie with php and web site configurations, so please be patient with me. When you go to my website, it redirects you to the catalog folder. I want it so that if you type in my website name, www.mysite.com, you go to www.mysite.com rather than www.mysite.com/catalog. I have a lot of contributions installed, so I don't want to mess things up. I'll back up the site before I implement any changes. Could somebody provide me with detailed instructions on how to do this (move the catalog folder)and what changes I would have to make to other files, if necessary? Thanks a lot for your help!
Guest Posted April 2, 2006 Posted April 2, 2006 In theory, all you need to do is move your entire osc folder UP a level (i.e. out of catalog into the root folder), then modify the settings in includes/configure.php and admin/includes/configure.php I say in theory as some of the contributions ask you to hardcode in the folder structure, and this could cause you some problems potentially. The alternative is to leave all your files where they are, then in your root directory create a file called index.php and add the following in as the contents: <?php echo file_get_contents ('http://www.yoursite.com/catalog/index.php'); ?> changing www.yoursite.com to your own url. So long as you dont have an index.htm in the folder, this will then show your store when people just type in your domain name. Have fun! :)
ddp Posted April 2, 2006 Posted April 2, 2006 Hi, I am a newbie with php and web site configurations, so please be patient with me. When you go to my website, it redirects you to the catalog folder. I want it so that if you type in my website name, www.mysite.com, you go to www.mysite.com rather than www.mysite.com/catalog. I have a lot of contributions installed, so I don't want to mess things up. I'll back up the site before I implement any changes. Could somebody provide me with detailed instructions on how to do this (move the catalog folder)and what changes I would have to make to other files, if necessary? Thanks a lot for your help! Actually this is pretty simple. I just did it to my site. Her is what to do: After you have backed up the contents of your /catalog folder to your computer with your freshly backed up database ftp your entire content of the catalog folder back to your server to the root directory not in a folder called catalog. Next step is to edit the two configure.php files one in catalog/includes and one in catalog/admin/includes. in catalog/includes/configure.php look for: define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); in catalog/admin/includes/configure.php look for: define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . '/www' . '/catalog/' ); // where your pages are located on the server. define('DIR_WS_ADMIN', '/catalog/admin/'); define('DIR_FS_ADMIN', $DOCUMENT_ROOT . '/www' . '/catalog/admin/'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', $DOCUMENT_ROOT . '/www' . '/catalog/'); change '/catalog/' to '/' Remember to change the permissions to 644 to upload these changed configure.php files and then put them back to 444. You will also need to password protect your /admin folder. The only other problem you will have is any links you made in your store that are direct hyperlinks to the old directory structure. Backup before making changes. Backup before making changes! Backup before making changes!! You did do a backup? eh?
zalik22 Posted April 3, 2006 Author Posted April 3, 2006 Actually this is pretty simple. I just did it to my site. Her is what to do: After you have backed up the contents of your /catalog folder to your computer with your freshly backed up database ftp your entire content of the catalog folder back to your server to the root directory not in a folder called catalog. Next step is to edit the two configure.php files one in catalog/includes and one in catalog/admin/includes. in catalog/includes/configure.php look for: define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); in catalog/admin/includes/configure.php look for: define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . '/www' . '/catalog/' ); // where your pages are located on the server. define('DIR_WS_ADMIN', '/catalog/admin/'); define('DIR_FS_ADMIN', $DOCUMENT_ROOT . '/www' . '/catalog/admin/'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', $DOCUMENT_ROOT . '/www' . '/catalog/'); change '/catalog/' to '/' Remember to change the permissions to 644 to upload these changed configure.php files and then put them back to 444. You will also need to password protect your /admin folder. The only other problem you will have is any links you made in your store that are direct hyperlinks to the old directory structure. Hi, I made these changes, but now when I click on a product, none of the links work. Please help! I have Header Tags Contribution installed, in case this affects the problem. Thanks for the help!
Guest Posted April 3, 2006 Posted April 3, 2006 Just been to your site m8, all is working fine...did u fix it?
zalik22 Posted April 3, 2006 Author Posted April 3, 2006 Just been to your site m8, all is working fine...did u fix it? I had it on redirect, still working on it now.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.