Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / A question about subdomains

A question about subdomains

Locked

Views: 1,242

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
27 Jun 2007, 10:46 AM
#1
molsonfl avatar

molsonfl

New Zenner

Join Date:
Jun 2007
Posts:
10
Plugin Contributions:
0

A question about subdomains

My zen is fully operational right now. It sits in a subdirectory on my server and is working fine. I would like to change how people get to the site however.

If my address is currently https://www.url.com/zen and I wish to change it to store.url.com will I have to do anything to my zen-cart if the sub-domain points to the same folder on my server. In other words, i wouldn't be moving any files in zen cart or changing the structure in any way. My host has sub-domains point to a folder so if I point my sub to the /zen folder then that should work without changes correct?

Thanks

27 Jun 2007, 12:34 PM
#2
iray avatar

iray

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: A question about subdomains

You should change includes/configure.php to fit the new location of your store and place the following code to the includes/application_top.php to prevent duplicate content penalty:

<?php

if(strpos($_SERVER['REQUEST_URI'], '/zen') !== false) {
  header("HTTP/1.1 301 Moved Permanently");
  header('Location: http://store.url.com'.str_replace('/zen', '', $_SERVER['REQUEST_URI']));
  exit();
}
?>

(You should modify this code to fit your real locations (replace /zen and store.url.com)).

27 Jun 2007, 12:38 PM
#3
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: A question about subdomains

Wrong. You will still have to make changes to Admin/includes/configure.php, and to includes/configure.php, to reflect the new correct address.

27 Jun 2007, 12:39 PM
#4
iray avatar

iray

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: A question about subdomains

Get Em Fast:

Wrong. You will still have to make changes to Admin/includes/configure.php, and to includes/configure.php, to reflect the new correct address.

... and what was I talking about? ;-)

27 Jun 2007, 12:43 PM
#5
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: A question about subdomains

iRAY:

... and what was I talking about? ;-)

iRay, it just so happened, that we was posting our posts at about the same time.
Now, you need to understand, as you're new here, that this is a friendly forum, and there's no need for the attitude. Just because you got here and got your post out, while I was typing mine, doesn't give you the right to get pissed off at me. What's your problem, this morning? Go have some more coffee, think about it, THEN come back!

27 Jun 2007, 12:48 PM
#6
iray avatar

iray

New Zenner

Join Date:
Jun 2007
Posts:
72
Plugin Contributions:
0

Re: A question about subdomains

Get Em Fast:

Now, you need to understand, as you're new here, that this is a friendly forum, and there's no need for the attitude. Just because you got here and got your post out, while I was typing mine, doesn't give you the right to get pissed off at me. What's your problem, this morning? Go have some more coffee, think about it, THEN come back!

Thanks for clarification. :oops: It wasn't personal attack to you, maybe due to my simple english... :frusty:

P.S. There is no morning in my country right now :-)

27 Jun 2007, 1:01 PM
#7
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: A question about subdomains

No, problem, iRay. Just wanted to get things cleared up before they got too heated. Have a good day.

27 Jun 2007, 1:16 PM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: A question about subdomains

:hug: Nice to see you guys shaking hands and playing nicely again :yes:

27 Jun 2007, 1:18 PM
#9
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: A question about subdomains

kuroi:

:hug: Nice to see you guys shaking hands and playing nicely again :yes:
Isn't it, though?
:D