Forums / Customization from the Admin / How to change the default URL?

How to change the default URL?

Results 1 to 9 of 9
21 Dec 2010, 16:44
#1
crazyartist avatar

crazyartist

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

How to change the default URL?

I have my store set up at http://www.ecosafebusiness.com/ShopZen/ (it was installed there by SimpleScripts). I would rather use http://shop.ecosafebusiness.com/ but Zen-Cart is placing absolute addresses in all the URLs instead of relative ones. How do I change the default URL?
21 Dec 2010, 18:23
#3
crazyartist avatar

crazyartist

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: How to change the default URL?

gjh42:

Move your Zen Cart to the domain root.
I have installed Zen Cart to a directory. How do I rename or move that directory?

Zen Cart will automatically generate correct URLs for its location when you do the move correctly.


Thanks for your quick reply. Unfortunately there is already a web site in the domain root. Where in the code would I find where the URL is detected? I know enough about PHP to change it as long as I can find it.
21 Dec 2010, 18:35
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: How to change the default URL?

I'm not sure you can do what you want. It might be possible with a URL rewriting mod - the CEON mod apparently gives the best flexibility.

If you have a site in the root, how would a visitor specify that they want to go to your ZC instead of the root site? The URL you describe points only to the root. You can't have it magically point to two different places depending on the visitor's mood.
21 Dec 2010, 19:03
#5
crazyartist avatar

crazyartist

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: How to change the default URL?

gjh42:

I'm not sure you can do what you want. It might be possible with a URL rewriting mod - the CEON mod apparently gives the best flexibility.

If you have a site in the root, how would a visitor specify that they want to go to your ZC instead of the root site? The URL you describe points only to the root. You can't have it magically point to two different places depending on the visitor's mood.


ZC isn't in the root. It's in /ShopZen/. The main site is in the root. But I may be misunderstanding your reference to 'root directory'. The main site is in /users/username/www/, ZC is in /users/username/www/ShopZen/. I have done a fair bit of PHP/mySQL/HTML programing/scripting, but I am far from being a server admin. My server admin program (cPanel) considers /www/ to be root and I am unable to point a subdomain any higher up.
21 Dec 2010, 19:16
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: How to change the default URL?

I missed the shop. in http://shop.ecosafebusiness.com/, so you're not asking for the identical URL as the root site.
It should be possible to point shop.ecosafebusiness to /ZenShop/, but I don't know how. Maybe an .htaccess file, or maybe a host/server configuration...
21 Dec 2010, 19:20
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: How to change the default URL?

You might need to alter HTTP_SERVER and/or DIR_WS_CATALOG in /includes/configure.php and /admin/includes/configure.php after getting the routing created.
21 Dec 2010, 19:47
#8
crazyartist avatar

crazyartist

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: How to change the default URL?

gjh42:

You might need to alter HTTP_SERVER and/or DIR_WS_CATALOG in /includes/configure.php and /admin/includes/configure.php after getting the routing created.


Ok. That worked. Thanx!!:clap:
27 Feb 2011, 03:12
#9
equitas avatar

equitas

New Zenner

Join Date:
Feb 2011
Posts:
1
Plugin Contributions:
0

Re: How to change the default URL?

I found this post about changing the location to a subdoain (not moving the zencart install location, just using a different url)
I haven't tried it yet, but it looks like it has some of the same details, and then some.

https://www.zen-cart.com/tutorials/index.php?article=122

I found it in this post:
http://www.zen-cart.com/forum/showthread.php?t=172975&highlight=subdomain

May you be well and happy