Post by sheridangraphics » Thu Aug 25, 2016 3:42 am

I have duplicated my main site on a sub-domain for testing purposes but it keeps redirecting to the main site.

Method I have used is as follows :

1, Created a sub domain through hosting server
2, created a mysql database and took details such as user, password and database name
3,went in to phpmyadmin and exported current database from main site and
imported in to new database which i made earlier.
4, copied everything in public through ftp and uploaded to sub domain.
5, changed config file in subdomain folder and the admin folder in subdomain such as the paths and updated user, pass and database names.

now in browser, after typing the address it appears fine but whatever link i click on it reverts back to the main site.

Any ideas??

Thanks in advance.

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by EvolveWebHosting » Thu Aug 25, 2016 3:59 am

Edit your .htaccess file for the 2nd site.

RewriteBase /subdomain/

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by sheridangraphics » Thu Aug 25, 2016 4:41 am

ive put it next to rewritebase/subdomain
Last edited by sheridangraphics on Thu Aug 25, 2016 4:55 am, edited 1 time in total.

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by sheridangraphics » Thu Aug 25, 2016 4:54 am

sorry found it and changed it so i have put the subdomain next to the rewritebase/ on both htaccess files which reside in the subdomain.

i'm typing in my browser www.mainsite.com/subdomain (as it appears in the ftp folder) and hops straight back to www.mainsite.com

I have also tried www.mainsite.com/subdomain with an error (to make it wrong to see what happens and if it detects that its not a page thats found which it correctly tells me that its not found)

based on this i assume its enetered correctly but its still hopping for some reason

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by EvolveWebHosting » Thu Aug 25, 2016 5:12 am

sheridangraphics wrote:sorry found it and changed it so i have put the subdomain next to the rewritebase/ on both htaccess files which reside in the subdomain.

i'm typing in my browser http://www.mainsite.com/subdomain (as it appears in the ftp folder) and hops straight back to http://www.mainsite.com

I have also tried http://www.mainsite.com/subdomain with an error (to make it wrong to see what happens and if it detects that its not a page thats found which it correctly tells me that its not found)

based on this i assume its enetered correctly but its still hopping for some reason
You confuse me when you say this:
sorry found it and changed it so i have put the subdomain next to the rewritebase/ on both htaccess files which reside in the subdomain.
You only modify the 1 .htacess file (the 2nd one that you setup).

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by sheridangraphics » Thu Aug 25, 2016 5:47 am

Thats what i thought but for some reason i have 2 in the sub domain so i changed them both they both look exactly the same. only one is .htaccess and the other is a .htaccess.txt

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by EvolveWebHosting » Thu Aug 25, 2016 6:09 am

sheridangraphics wrote:Thats what i thought but for some reason i have 2 in the sub domain so i changed them both they both look exactly the same. only one is .htaccess and the other is a .htaccess.txt
Just delete .htaccess for now and edit .htaccess.txt

If you want to use SEO URLs in the near future, rename .htaccess.txt to .htaccess and enable it under the System Settings -->> Edit -->> Server tab.

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by sheridangraphics » Thu Aug 25, 2016 6:22 am

Just did that and still hopping to the main domain url.

this is how my config files look like:

<?php
// HTTP
define('HTTP_SERVER', 'http://mainsiteurl.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'http://mainsiteurl.co.uk/');

// DIR
define('DIR_APPLICATION', '/home6/shera8/public_html/backmeupv15/catalog/');
define('DIR_SYSTEM', '/home6/shera8/public_html/backmeupv15/system/');
define('DIR_DATABASE', '/home6/shera8/public_html/backmeupv15/system/database/');
define('DIR_LANGUAGE', '/home6/shera8/public_html/backmeupv15/catalog/language/');
define('DIR_TEMPLATE', '/home6/shera8/public_html/backmeupv15/catalog/view/theme/');
define('DIR_CONFIG', '/home6/shera8/public_html/backmeupv15/system/config/');
define('DIR_IMAGE', '/home6/shera8/public_html/backmeupv15/image/');
define('DIR_CACHE', '/home6/shera8/public_html/backmeupv15/system/cache/');
define('DIR_DOWNLOAD', '/home6/shera8/public_html/backmeupv15/download/');
define('DIR_LOGS', '/home6/shera8/public_html/backmeupv15/system/logs/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'database subdomain username');
define('DB_PASSWORD', 'subdomain pass');
define('DB_DATABASE', 'databenameofsubdomain');
define('DB_PREFIX', 'oc_');
?>

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by EvolveWebHosting » Thu Aug 25, 2016 10:46 am

sheridangraphics wrote:Just did that and still hopping to the main domain url.

this is how my config files look like:

<?php
// HTTP
define('HTTP_SERVER', 'http://mainsiteurl.co.uk/');

// HTTPS
define('HTTPS_SERVER', 'http://mainsiteurl.co.uk/');

// DIR
define('DIR_APPLICATION', '/home6/shera8/public_html/backmeupv15/catalog/');
define('DIR_SYSTEM', '/home6/shera8/public_html/backmeupv15/system/');
define('DIR_DATABASE', '/home6/shera8/public_html/backmeupv15/system/database/');
define('DIR_LANGUAGE', '/home6/shera8/public_html/backmeupv15/catalog/language/');
define('DIR_TEMPLATE', '/home6/shera8/public_html/backmeupv15/catalog/view/theme/');
define('DIR_CONFIG', '/home6/shera8/public_html/backmeupv15/system/config/');
define('DIR_IMAGE', '/home6/shera8/public_html/backmeupv15/image/');
define('DIR_CACHE', '/home6/shera8/public_html/backmeupv15/system/cache/');
define('DIR_DOWNLOAD', '/home6/shera8/public_html/backmeupv15/download/');
define('DIR_LOGS', '/home6/shera8/public_html/backmeupv15/system/logs/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'database subdomain username');
define('DB_PASSWORD', 'subdomain pass');
define('DB_DATABASE', 'databenameofsubdomain');
define('DB_PREFIX', 'oc_');
?>
Why does your URL point to the main URL and not the subdomain URL?

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by sheridangraphics » Thu Aug 25, 2016 7:50 pm

I did think it could be that but wasn't sure, In any case i changed it but the issue remains. I tried a different browser (was using chrome) in explorer it doesn't hop but comes up with an error 500 message.


The website cannot display the page

HTTP 500


Most likely causes:
•The website is under maintenance.
•The website has a programming error.


What you can try:



Refresh the page.



Go back to the previous page.



More information More information


This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

For more information about HTTP errors, see Help.


I feel pretty certain i've done everything right but just doesnt seem to work.

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by EvolveWebHosting » Thu Aug 25, 2016 9:18 pm

Change the URL for both config files on the test site. Make sure you have RewriteBase /subdomain-name/ (replace subdomain-name) in the .htaccess or .htaccess.txt file for the test site. You may also need to put a # before the line about OptionFollowSymLinks

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by sheridangraphics » Thu Aug 25, 2016 11:47 pm

So here's what i've done :

Changed the URL's for both config files on the backup site.

in admin and in the main subdomain folder

so its like this /subdomain/ (on both lines)


on RewriteBase /subdomain-name/ (also tried with and without the space)


anywhere in the htaccess file my main domain name resides, i have replaced with the sub-domain.


from this
Options +FollowSymlinks
i put a # in front like this:
#Options +FollowSymlinks

Could it be anything to do with numbers in the subdomain?
or could there be an seo conflict??

i tried writing both url's like this
http://www.mainsite.co.uk/sub-domain - error 500 comes up.
and this
http://www.mainsite.co.uk/public_html/sub-domain- main site comes up but with a message saying The page you requested cannot be found!
but no difference

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by EvolveWebHosting » Fri Aug 26, 2016 12:32 am

sheridangraphics wrote:So here's what i've done :

Changed the URL's for both config files on the backup site.

in admin and in the main subdomain folder

so its like this /subdomain/ (on both lines)


on RewriteBase /subdomain-name/ (also tried with and without the space)


anywhere in the htaccess file my main domain name resides, i have replaced with the sub-domain.


from this
Options +FollowSymlinks
i put a # in front like this:
#Options +FollowSymlinks

Could it be anything to do with numbers in the subdomain?
or could there be an seo conflict??

i tried writing both url's like this
http://www.mainsite.co.uk/sub-domain - error 500 comes up.
and this
http://www.mainsite.co.uk/public_html/sub-domain- main site comes up but with a message saying The page you requested cannot be found!
but no difference
I'm hoping that you actually used the sub domain folder that you created instead of 'sub-domain'

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by sheridangraphics » Fri Aug 26, 2016 2:31 am

lol yes I used the name of my sub domain. Ill private message you some screen shots may be you could take a look if thats ok with you??

Would appreciate it.

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by sheridangraphics » Sun Aug 28, 2016 10:30 pm

I spoke to my hosting site and they told me its not working due to a third part installation which is preventing it. I am now trying to edit the code to see if that will fix it.

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am

Post by victorj » Mon Aug 29, 2016 11:11 pm

i should start with removing all files in vqmod cache, here its possible that a absolute url is writen to vqmod files, if all files are removed, they will be gereated afgain with corrext url information.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by sheridangraphics » Fri Sep 09, 2016 6:14 am

Hi Thanks for the reply, so shall i remove and then just repaste, in vqmod??

New member

Posts

Joined
Fri Feb 20, 2015 12:47 am
Who is online

Users browsing this forum: No registered users and 158 guests