We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8394
    • 24 Posts
    modx 1.0.5
    WAMP
    Windows XP SP 3
    Apache 2.2.17
    MySQL 5.1. 41
    PHP 5.3.5
    Firefox 3.6.15

    I’m doing my initial development using WAMP. When I access the development Web site from the machine it’s installed on, everything is working as expected. However, WAMP also supports remote access from other computers on the network, but when I try accessing the development page from a different computer (as http://nnn.nnn.nnn.nnn where the nnn’s are the IP address of my computer) the displayed page has no formatting or graphics.

    It’s clear that modx is doing its stuff, as all the content is on the page (including text, links, etc.) which is obtained from templates, chunks. snippets, etc. But it looks like it isn’t able to find the styles or images. It finds them when I access locally, but not remotely. Seems weird to me! As far as I know, the location of these things is dealt with entirely on the "server" side and all references should be path relative to what the server defines, so it doesn’t seem like it should make any difference whether the call to the server comes from its own computer (localhost) or from a remote computer, but apparently I’m wrong about this somewhere...

    Does anyone have an idea of what I need to do differently to allow the server to find its files when it’s servicing a remote call?

    Thanks as always!

    - Dave
      • 4310
      • 2,310 Posts
      Try adding <base href="http://nnn.nnn.nnn.nnn" /> to the <head> section of your templates.
      That’s what I do for LAN access smiley
        • 8394
        • 24 Posts
        Works perfectly! Many thanks.

        I previously had:

        <base href="[(site_url)]"

        which seems to me like it should have been doing the same thing, but apparently wasn’t. By explicitly putting an IP address (instead of a system variable) in the code, I’ll have to remember to change it before I copy it up to my web hosting service, but that shouldn’t be a big deal.

        Thanks again,

        - Dave