Page 1 of 1
[Solved] Problem with url of my site
Posted: Sun Jul 31, 2016 10:57 pm
by man1ac
Hi, I just installed opencart 2.2.0 at godaddy windows server. My problem is that the site was installed at wrong url, my domain name is "example.com" but opencart installed at "example.com/example". I change the config.php files (both admin and root) and i gave the right url destination but the problem persist inside the site urls.
What can i do?
*the example.com is an example... not the true url
Thanks in advance
Re: Problem with url of my site
Posted: Sun Jul 31, 2016 11:26 pm
by straightlight
man1ac wrote:Hi, I just installed opencart 2.2.0 at godaddy windows server. My problem is that the site was installed at wrong url, my domain name is "example.com" but opencart installed at "example.com/example". I change the config.php files (both admin and root) and i gave the right url destination but the problem persist inside the site urls.
What can i do?
*the example.com is an example... not the true url
Thanks in advance
Ensure your .htaccess file also points to the right domain and path; also depending if you're using a custom .htaccess file and clear the cache from your system/storage/cache folder (except the index.html file).
Re: Problem with url of my site
Posted: Sun Jul 31, 2016 11:47 pm
by man1ac
straightlight wrote:
Ensure your .htaccess file also points to the right domain and path; also depending if you're using a custom .htaccess file and clear the cache from your system/storage/cache folder (except the index.html file).
My htaccess is the one that it came with the installation, i didn't change anything in it... so i presume it's ok!
Last, i delete the cache but it didn't change anything.
Is there anywhere else to change the url destinations?
Re: Problem with url of my site
Posted: Sun Jul 31, 2016 11:52 pm
by straightlight
man1ac wrote:straightlight wrote:
Ensure your .htaccess file also points to the right domain and path; also depending if you're using a custom .htaccess file and clear the cache from your system/storage/cache folder (except the index.html file).
My htaccess is the one that it came with the installation, i didn't change anything in it... so i presume it's ok!
Last, i delete the cache but it didn't change anything.
Is there anywhere else to change the url destinations?
Could you post your root config.php file and your admin/config.php files without credentials information?
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 12:02 am
by man1ac
Root config.php
Code: Select all
<?php
// HTTP
define('HTTP_SERVER', 'http://telefon.gr/');
// HTTPS
define('HTTPS_SERVER', 'http://telefon.gr/');
// DIR
define('DIR_APPLICATION', 'D:/Hosting/6506083/html/telefon/catalog/');
define('DIR_SYSTEM', 'D:/Hosting/6506083/html/telefon/system/');
define('DIR_IMAGE', 'D:/Hosting/6506083/html/telefon/image/');
define('DIR_LANGUAGE', 'D:/Hosting/6506083/html/telefon/catalog/language/');
define('DIR_TEMPLATE', 'D:/Hosting/6506083/html/telefon/catalog/view/theme/');
define('DIR_CONFIG', 'D:/Hosting/6506083/html/telefon/system/config/');
define('DIR_CACHE', 'D:/Hosting/6506083/html/telefon/system/storage/cache/');
define('DIR_DOWNLOAD', 'D:/Hosting/6506083/html/telefon/system/storage/download/');
define('DIR_LOGS', 'D:/Hosting/6506083/html/telefon/system/storage/logs/');
define('DIR_MODIFICATION', 'D:/Hosting/6506083/html/telefon/system/storage/modification/');
define('DIR_UPLOAD', 'D:/Hosting/6506083/html/telefon/system/storage/upload/');
// DB
******
admin - config.php
Code: Select all
<?php
// HTTP
define('HTTP_SERVER', 'http://telefon.gr/admin/');
define('HTTP_CATALOG', 'http://telefon.gr/');
// HTTPS
define('HTTPS_SERVER', 'http://telefon.gr/admin/');
define('HTTPS_CATALOG', 'http://telefon.gr/');
// DIR
define('DIR_APPLICATION', 'D:/Hosting/6506083/html/telefon/admin/');
define('DIR_SYSTEM', 'D:/Hosting/6506083/html/telefon/system/');
define('DIR_IMAGE', 'D:/Hosting/6506083/html/telefon/image/');
define('DIR_LANGUAGE', 'D:/Hosting/6506083/html/telefon/admin/language/');
define('DIR_TEMPLATE', 'D:/Hosting/6506083/html/telefon/admin/view/template/');
define('DIR_CONFIG', 'D:/Hosting/6506083/html/telefon/system/config/');
define('DIR_CACHE', 'D:/Hosting/6506083/html/telefon/system/storage/cache/');
define('DIR_DOWNLOAD', 'D:/Hosting/6506083/html/telefon/system/storage/download/');
define('DIR_LOGS', 'D:/Hosting/6506083/html/telefon/system/storage/logs/');
define('DIR_MODIFICATION', 'D:/Hosting/6506083/html/telefon/system/storage/modification/');
define('DIR_UPLOAD', 'D:/Hosting/6506083/html/telefon/system/storage/upload/');
define('DIR_CATALOG', 'D:/Hosting/6506083/html/telefon/catalog/');
// DB
*****
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 12:18 am
by straightlight
These two definitions are still showing that you load your website from the root folder rather than the sub-folder. You'd need to add the sub-folder name at the end of each URL and add a trailing slash to them. The admin/config.php file should also be verified with those instances with the four defined constant with each URLs. Then, clear cache again and reload the website twice to see if that solves the issue.
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 12:20 am
by man1ac
straightlight wrote:
These two definitions are still showing that you load your website from the root folder rather than the sub-folder. You'd need to add the sub-folder name at the end of each URL and add a trailing slash to them. The admin/config.php file should also be verified with those instances with the four defined constant with each URLs. Then, clear cache again and reload the website twice to see if that solves the issue.
But thats the problem, i don't want to show the folder in my site url! i want to show telefon.gr/product12, than telefon.gr/telefon/product12
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 12:28 am
by straightlight
man1ac wrote:straightlight wrote:
These two definitions are still showing that you load your website from the root folder rather than the sub-folder. You'd need to add the sub-folder name at the end of each URL and add a trailing slash to them. The admin/config.php file should also be verified with those instances with the four defined constant with each URLs. Then, clear cache again and reload the website twice to see if that solves the issue.
But thats the problem, i don't want to show the folder in my site url! i want to show telefon.gr/product12, than telefon.gr/telefon/product12
Then, your enquiry is rather SEO links. See this topic for more information:
http://forum.opencart.com/viewtopic.php?f=2&t=165616
However, I would encourage to upgrade to the Opencart v2.3.0.1 stable release which also fixes path issues from OC v2.2.0.0 release:
http://forum.opencart.com/viewtopic.php?f=2&t=165970
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 12:38 am
by man1ac
Could you please narrow down what i am going to change in .htaccess? Because i am kind lost!
I just inform you that there the folder in my server is webroot/telefon
and all the files of opencart are in the folder telefon... why the opencart creates the telefon/telefon url?
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 12:45 am
by straightlight
man1ac wrote:Could you please narrow down what i am going to change in .htaccess? Because i am kind lost!
I just inform you that there the folder in my server is webroot/telefon
and all the files of opencart are in the folder telefon... why the opencart creates the telefon/telefon url?
Opencart installation does not create new folders. The out-of-the-box and delivered ZIP files contains an upload folder which is already a sub-folder. However, if you want the files to be installed on your root folder, the simplistic way to do it is by uploading the files from inside the upload folder towards your FTP server.
Another quick and efficient way to do this would be by using the decompress button from the File Manager in either cPanel or Plesk after uploading the ZIP file. Then, to move the folders and files to your root folder before running the installation. More detailed information can be found here on how to proceed:
http://forum.opencart.com/viewtopic.php?f=141&t=165721
As for .htaccess, the link information has already been provided above. If you require customized settings to be done with your .htaccess, it would be the best location to do so. In addition, the extensions store from this site provides several different SEO modules you could rely on by viewing this link:
http://www.opencart.com/index.php?route ... /extension
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 1:10 am
by man1ac
straightlight wrote:man1ac wrote:Could you please narrow down what i am going to change in .htaccess? Because i am kind lost!
I just inform you that there the folder in my server is webroot/telefon
and all the files of opencart are in the folder telefon... why the opencart creates the telefon/telefon url?
Opencart installation does not create new folders. The out-of-the-box and delivered ZIP files contains an upload folder which is already a sub-folder. However, if you want the files to be installed on your root folder, the simplistic way to do it is by uploading the files from inside the upload folder towards your FTP server.
But in the root server is hosted another domain! The server has 6 domains and that i hosted is not the primary... the only problem i am having is with opencart, i am thinking it is a dns problem. I am hosting the domain name from another company to the nameservers of the host (godaddy). I am thinking it's more of something like that that seo or htaccess problem.
Thanks for your assistance anyway!
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 4:35 pm
by man1ac
The problem has been solved. As i said earlier it was a server problem, not an opencart problem. I change server from windows to linux and the problem automatically solved!
Thanks straightlight for your help.
Re: Problem with url of my site
Posted: Mon Aug 01, 2016 6:29 pm
by straightlight
man1ac wrote:The problem has been solved. As i said earlier it was a server problem, not an opencart problem. I change server from windows to linux and the problem automatically solved!
Thanks straightlight for your help.
Good to know that Opencart operates better on Linux than Windows specs.