astecme Posted December 16, 2015 Posted December 16, 2015 Hi, I wanted to upgrade to OsC 2.3... from 2.2 mainly because of support costs for old PHP versions. The only way that I can test on a different PHP version is to use a subdomain e.g. shop.example.com The install works fine but from there I have problems and need some help. My first "problem" is that when I try to access the admin section I get a time out due to a re-direct loop. I cannot see where adminst/login is trying to re-direct to so knowing that would be some help. Secondly I use https on my original shop and I have re-directs in place so that http://wwwexample.comgets re-directed to https://example.com and that needs to stay in place. So I think I need an exception rule RewriteCond %{HTTP_HOST} ^(.*\.)*example.uk$ [NC,OR]RewriteCond %{HTTP_HOST} ^(.*\.)*example.com$ [NC,OR]RewriteCond %{HTTP_HOST} ^(.*\.)*example.co.uk$ [NC]RewriteCond %{SERVER_PORT} !^443$RewriteRule ^(.*)$ https://astecmodels.co.uk/$1[R] I have tried adding to the above but I am a total beginner with .htaccess files so I think I do not understand the necessary syntax correctly. Any help would be appreciated. Also if anyone has a way of populating the new database from a 2.2 version I would be eternally grateful. Thanks Allan
Jack_mcs Posted December 16, 2015 Posted December 16, 2015 For the loop problem, you need to post your admin configure file here, except for the last few lines that have the login details. For the second, I've never tried it but I doubt that you can do that since ssl certs will only work for the domain they were created for. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
astecme Posted December 17, 2015 Author Posted December 17, 2015 Thx, here you go. <?php define('HTTP_SERVER', 'http://shop.astecmodels.co.uk'); define('HTTPS_SERVER', 'http://shop.astecmodels.co.uk'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/adminst'); define('HTTPS_COOKIE_PATH', '/adminst'); define('HTTP_CATALOG_SERVER', 'http://shop.astecmodels.co.uk'); define('HTTPS_CATALOG_SERVER', 'http://shop.astecmodels.co.uk'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/homepages/17/d415605883/htdocs/shop/'); define('DIR_WS_ADMIN', '/adminst/'); define('DIR_WS_HTTPS_ADMIN', '/adminst/'); define('DIR_FS_ADMIN', '/homepages/17/d415605883/htdocs/shop/adminst/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_FS_CATALOG', '/homepages/17/d415605883/htdocs/shop/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); 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', DIR_WS_CATALOG . 'includes/languages/'); 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_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'Europe/London');?>
clustersolutions Posted December 17, 2015 Posted December 17, 2015 @@astecme, sub-domain usually update the dns automatically so you may want to make sure that you "maintain" your subdomain in a dev environment. it can be done but how are you setting up your different versions of PHPs? wouldn't it just be simpler to set up the new osc in the exact future LAMP production environment?
astecme Posted December 19, 2015 Author Posted December 19, 2015 My ISP provides the ability to run different versions of PHP in different subdomains. So the main domain could run PHP5.2 and the sub domain 5.5. IT is starnge but the first time I enter the subdomain the www address remains as shop....... next time and it reverts to the main domain. So I am not sure whether the HTaccess file in the main domain caught the second request or whther the htaccess redirect caught it.
Jack_mcs Posted December 19, 2015 Posted December 19, 2015 @@astecme I don't see a problem with the configure file but I'm not able to test it here at the moment. But sub-domains are usually just a sub-directory for the main site so I suggest using that instead. You would then be able to use the ssl without any problems. Since it is only for your use, it doesn't matter what the url is. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
MrPhil Posted December 20, 2015 Posted December 20, 2015 Usually a different PHP version is set with the .htaccess file anywhere, so it would be normal to have it available in any subdirectory on your site (and all directories below that), but unusual to require a full-fledged subdomain. They probably just gave a subdomain as a simple example. Go ahead and try the .htaccess code that specifies the PHP version in a plain subdirectory such as /test and see if it works.
astecme Posted December 22, 2015 Author Posted December 22, 2015 MrPhil, Thanks but the PHP version choice is only available in a subdomain with my ISP. I get the same with the admin index page as that re-directs to the login page and in doing so the sub domain reference is dropped. Now the redirect is coming from the "wrong" place and it gets re-directed. DOH!
MrPhil Posted December 22, 2015 Posted December 22, 2015 See what commands (AddType, AddHandler, etc.) they insert into the subdomain's .htaccess, and give them a try in a subdirectory on your main domain. Usually it will work. If not, you're no worse off than you were before. Hosts will often tell their customers that something "only works with a subdomain" simply because they want to keep things simple, and not confuse their customers and incur extra support costs.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.