Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2011
    Posts
    15
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Possible to have all links be relative URLs?

    Quote Originally Posted by jobber99 View Post
    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

  3. #3
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Mar 2011
    Posts
    15
    Plugin Contributions
    0

    Default 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?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Mar 2011
    Posts
    15
    Plugin Contributions
    0

    Default 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?

  7. #7
    Join Date
    Mar 2011
    Posts
    15
    Plugin Contributions
    0

    Default 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

  8. #8
    Join Date
    Mar 2011
    Posts
    15
    Plugin Contributions
    0

    Default 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?

  9. #9
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Possible to have all links be relative URLs?

    Moderator's note: new thread on same subject merged here.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

 

 

Similar Threads

  1. Relative URLs in Product Description
    By gharls in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 2 Aug 2010, 10:50 PM
  2. Replies: 5
    Last Post: 5 May 2010, 02:48 PM
  3. products price manager - is it possible to have discount at all attributes?
    By 100asa in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 9 Aug 2009, 04:32 PM
  4. relative links
    By mex in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Apr 2007, 12:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR