Page 1 of 1

Having trouble installing Opencart on addon domain

Posted: Wed Jun 25, 2014 10:58 am
by elenichee
Hi,

I am really new to Opencart and would appreciate any advice anyone can give me...

I have Opencart installed on my main domain, which is http://www.faxxx.com

I am now trying to install another instance of Opencart on my new domain, which is http://www.drxxx.com.

I have uploaded all the installation files to my /public_html/www.drxxx.com folder and renamed the config files accordingly. However, when I try to access http://www.drxxx.com, the URL automatically changes to http://www.faxxx.com/www.drxxx.com/install/index.php.

I don't understand why this is happening... does anyone have any ideas? Please help... thanks.

Re: Having trouble installing Opencart on addon domain

Posted: Thu Jun 26, 2014 1:03 pm
by Cleo
In your cpanel you have to make a redirection to http://www.drxxx.com

Don't forget to delete your install folder!!!!

Cleo

Re: Having trouble installing Opencart on addon domain

Posted: Sat Jun 28, 2014 8:49 pm
by elenichee
Hi Cleo,

Thanks for your reply. I have already made the redirection in my cpanel but it didn't work. I actually had to add these lines of code to my .htaccess file:-

# 301 direct to preferred domain
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.drxxx.com$ [NC]
RewriteRule ^(.*)$ http://www.drxxx.com/$1 [L,R=301]
# End 301 direct

After adding the above code, it is working correctly on my desktop and ipad. However, when I tested it on my iphone, the same weird problem is happening again - that is, if I enter http://www.drxxx.com, it goes back to http://www.faxxx.com/www.drxxx.com and I get a 404 error.

I have also already deleted my install folder...why is it only happening on my mobile??

Any advice will be much appreciated.. thanks!

Re: Having trouble installing Opencart on addon domain

Posted: Sat Jun 28, 2014 10:09 pm
by cwswebdesign
Hi,

After you've created an add on domain, you don't need to create a redirect for it. If you'd like help, feel free to email support@evolvewebhost.com

DL

Re: Having trouble installing Opencart on addon domain

Posted: Sun Jun 29, 2014 2:11 am
by Dhaupin
If the iphone is still doing it, it may just be DNS cached with the old route. Sometimes HT changes take a minute to appear in other device/connection caches. Check it through a web proxy you have never used before like kproxy.com to see the latest route. Some other suggestions if you are curious...we normally run all under 1 multistore but these may still apply:

So at least in Apache, addons operate like http://www.addon.com = http://www.addon.com.maindomain.com as a general mask. Not sure how it would work the opposite. Make sure when you create the addon domain in cpanel that you make its natural home in the subfolder your install is located at. The chosen subdomain name will now be its route. Normally cpanel makes this for you with a folder called http://www.addon.com, but you can name/point it to whatever. As long as there is an A record pointing to your server IP, itll pick up the request through that subdomain, dump it wherever folder is set for that sub. Generally redirects arent needed here, but they are needed to mask utility urls still present from the main domain sub-forwarder.

Dunno if this will help but if the addon sits as a subdomain of your main domain as well, here is how to forward to real domain to prevent duplicate index, there is one for https too. Looks like you can add them onto yours with some tweak

Code: Select all

RewriteCond %{HTTP_HOST} ^drxxx\.fashionurges\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.drxxx\.fashionurges\.com$ [OR]
RewriteCond %{HTTP_HOST} ^drxxx\.com$
RewriteRule ^(.*)$ "http\:\/\/www\.drxxx\.com\/$1" [R=301,L]

RewriteCond %{HTTPS_HOST} ^drxxx\.fashionurges\.com$ [OR]
RewriteCond %{HTTPS_HOST} ^www\.drxxx\.fashionurges\.com$ [OR]
RewriteCond %{HTTPS_HOST} ^drxxx\.com$
RewriteRule ^(.*)$ "https\:\/\/www\.drxxx\.com\/$1" [R=301,L]
Also in config.php define the drxxx.com including the http:// and https:// and the slash at the end like .com/

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.drxxx.com/');

// HTTPS
define('HTTPS_SERVER', 'http://www.drxxx.com/');

Re: Having trouble installing Opencart on addon domain

Posted: Sun Jun 29, 2014 2:12 am
by Cleo
Ooooops! My mistake :( cwswebdesign is right no redirect for an addon domain, it's because I also create a subdomain which I redirect to one of my domain, but my addon domains are not redirect!

Cleo