Уважаемые господа, У нас после установки Opencart на ранее размещенный в Rucenter домен mydomen.ru в настройках магазина указан URL mydomen.nichost.ru Как можно изменить URL на mydomen.ru ? Так как при добавлении товара URL страницы выглядит как mydomen.nichost.ru/tovar и выводится с кодом 404, да и вообще этот nichost не нужен. На хостинге mydomen.ru и mydomen.nichost.ru указаны как синонимы. Я понимаю, что mydomen.nichost.ru вроде как основной домен, т.к. на сервере папка имеет вид mydomen.nichost.ru Знаком только с работой cpanel на других хостингах, когда корнем сайта является папка public_html , а в rucenter файлы сайта расположены в папке mydomen.nichost.ru , да еще не просто в ней, а во вложенной папке docs. Получается docs - это и есть корневая папка? Ведь домен работал (отображался) и "своей" папки mydomen у него не было. Техподдержка хостинга пишет, что изменять url надо в настройках магазина. Может надо было устанавливать Opencart в другую папку, но в какую? Техподдержка говорит, что сам домен установлен корректно, да он и работал до установки opencart. Что подскажите? Заранее благодарен
Домены и пути меняются в файлах согласно документации. http://forum.opencart-russia.ru/threads/rukovodstvo-administratora.453/#post-2661
Ален, 1. Попытался изменить config.php и admin/config.php Ничего хорошего из этого не вышло.... После установки opencart на домене Rucenter все файлы opencart размещены в папке mydomen.nichost.ru/docs Отдельной папки (типа public_html или mydomen.ru) у них нет - все зачем-то через nichost Техподдержка отправляет к разработчикам opencart и пишет: "Так как доменное имя mydomen.ru является синонимом mydomen.nichost.ru, то корневой директорией для них обоих будет ~/mydomen.nichost.ru/docs/" Я изменил пути в config.php и admin/config.php с mydomen.nichost.ru/docs/ на mydomen.ru - все равно не идет. Если же оставлять путь mydomen.nichost.ru/docs/ - то страницы сайта, естественно, имеют адрес mydomen.nichost.ru Что посоветуете? 2. В админке в Система-Настройки прописан url mydomen.nichost.ru Как он туда прописывается? Может в config надо изменить путь не во всех строках? 3. Также непонятно: Меняю имя файла .htaccess.txt на .htaccess (через ftp) - сайт становится недоступным. А это почему?
Так все и было: - сначала был установлен opencart: в папку mydomen.nichost.ru/docs (другой папки нет и техподдержка говорит, что nichost - это синоним) - в конфигах сразу прописался путь mydomen.nichost.ru - админка и сайт при этом имеют адреса тоже mydomen.nichost.ru (чего не хочется). Я понял по предыдущему совету, что указав в конфигах путь mydomen.ru (без nichost) и путь у файлам найдется (так как синонимы) и адреса страниц будут нужными (mydomen.ru), но после изменения в конфигах mydomen.nichost.ru на mydomen.ru сайт вообще перестал был доступен.... Также непонятно, почему переименование .htaccess.txt на .htaccess также приводит к недоступности сайта.... Может еще где-нибудь надо пути менять? Или менять не во всех строках конфигов, а только в тех, которые отвечают за формирование url страниц?
Код: // HTTP define('HTTP_SERVER', 'http://chaikoff.nichost.ru/'); // HTTPS define('HTTPS_SERVER', 'http://chaikoff.nichost.ru/'); вот тут должно быть например http://chaikoff.ru
Спасибо за совет! Этого оказалось, правда, мало - изменил еще путь в // HTTP define('HTTP_CATALOG', 'http://chaikoff.ru/'); и // HTTPS define('HTTPS_CATALOG', 'http://chaikoff.ru/'); и все стало на свои места. Путанный этот RUCENTER .... Еще раз спасибо!
Только вот непонятно, почему при переименовании .htaccess.txt на .htaccess сайт становится недоступным? htaccess стандартный, ничего в нем не менял, да и пути в нем нет: (а его обязательно менять надо?) # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess. # For any support issues please visit: http://www.opencart.com Options +FollowSymlinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Order deny,allow Deny from all </FilesMatch> # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] ### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: # php_flag register_globals off # 2. If your cart has magic quotes enabled, This may work to disable it: # php_flag magic_quotes_gpc Off # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try # php_value upload_max_filesize 999M # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value post_max_size 999M # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_execution_time 200 # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none
уберите все эти портянки. Есть рекомендации по оформлению сообщений http://forum.opencart-russia.ru/threads/rekomendacii-po-oformleniju-koda-i-voprosov.460/ По htaccess спросите хостера, почему он такой плохой и не хочет принимать нормальный настроенный файл ))
Прячу портянки и пишу корректно)) Так это htaccess корректный: (Ваше мнение: в чем проблема может быть у хостера?) Код: # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess. # For any support issues please visit: http://www.opencart.com Options +FollowSymlinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Order deny,allow Deny from all </FilesMatch> # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] ### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: # php_flag register_globals off # 2. If your cart has magic quotes enabled, This may work to disable it: # php_flag magic_quotes_gpc Off # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try # php_value upload_max_filesize 999M # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value post_max_size 999M # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_execution_time 200 # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none
хостер ответит. Это его проблемы. возможно в строке Код: <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> вариант замены был на форуме.
Вопрос с переименованием .htaccess.txt решен: до этого на хостинге была версия PHP 5.3 хостер установил PHP 5.4 - и все получилось. Странно, т.к. для opencart минимальная версия PHP - 5.3