Possible to have all links be relative URLs?
hi everybody,
the way we are setting up our shopping cart, we are having the zen-cart-powered shopping cart in the firewall, with a proxy server on the outside proxying data to the shopping cart. i noticed though, that all URLS in zen-cart are absolute (to whatever was set in configure.php's HTTPSERVER parameter). is there any way to make those absolute URLs be relative, so that it will work with the proxy server?
Re: Possible to have all links be relative URLs?
Quote:
Originally Posted by
jobber99
hi everybody,
the way we are setting up our shopping cart, we are having the zen-cart-powered shopping cart in the firewall, with a proxy server on the outside proxying data to the shopping cart. i noticed though, that all URLS in zen-cart are absolute (to whatever was set in configure.php's HTTPSERVER parameter). is there any way to make those absolute URLs be relative, so that it will work with the proxy server?
Short answer.... No. not possible. There has to be at least one absolute URL in order to give the others something to be relative too.
zencart has 2 such links, one for the normal docroot and the other for the SSL docroot.
Furthermore I'm not quite understanding why the absolute URL's will cause things to not work with a proxy server, because if this needs to be changed it defeats to purpose of using a proxy server in the first place. I suspect that whatever problems you are having is related to your proxy rather than any zencart configurations.
Cheers
Rod
Re: Possible to have all links be relative URLs?
WHY are you using that sort of proxying scheme, or any for that matter, in the first place?
Are you thinking it gives some sort of added security for some reason?
What's your business logic for this strategy?
Re: Possible to have all links be relative URLs?
thanks for the replies. the reason we are proxying is this: we have all our internal solutions in a VM, but there are no VMs in the DMZ, thus a proxy is needed to have those from the outside access the VM instances (such as this gift shop we have powered by zen-cart) everything works EXCEPT that no session seems to be kept (that is, adding to cart, logging in, checking out, etc. all don't work)
i am assuming this is a cookie issue?
Re: Possible to have all links be relative URLs?
Yes, if session cookies cannot be set, you're going to have constant problems, especially when it comes to SSL for protecting customers' personal data.
Re: Possible to have all links be relative URLs?
thanks for the reply--i tried using mod_proxy_html to rewrite the URLs within the cart, but am still having trouble getting any session to "stick"...is there any way i can have session info come through the proxy? or am i relegated to not using a proxy for this solution?
Zen-Cart and proxy server
Hi,
so we have zen-cart in an internal VM, and have a proxy server that is in the DMZ to proxy traffic from the internet to our zen-cart shopping cart. how do i set this up? currently, i have the proxy working fine except when it comes to session stuff (that is, i can't log in, add anything to my cart, etc.) is this possible? that is, can i have zen-cart on VM machine xxx.mydomain.com, have a proxy called proxy.mydomain.com, and have it work correctly? please help
Re: Zen-Cart and proxy server
ok, i found a solution on the forums that mentioned changing the cookie domain, so i did to this:
<?php
define('HTTP_COOKIE_DOMAIN', '');
define('HTTPS_COOKIE_DOMAIN', '');
?>
is there any downside to that?
Re: Possible to have all links be relative URLs?
Moderator's note: new thread on same subject merged here.