Remote /private/etc/host does not load images/css/jscript

Discussion in 'Web Design and Development' started by iambron, Apr 28, 2009.

  1. iambron macrumors newbie

    Joined:
    Apr 28, 2009
    #1
    Hi all,

    I have made a change to the /private/etc/host file, to have an additional line like this >
    example.lan 223.23.21.2

    note: remote ip, not local

    I have done this on a windows machine and it works well, checked with a fellow developer, it works on his machine as well.

    But on my macbook, the page loads but just words, Without the css/jscript/images files being loaded. I typed the address of the files in question, i cannot load them as well..

    I am not sure what is wrong here, i am using MAMP as well for my local development but this problem is for a remote development. Will appreciate any help. thanks in advance.
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Did you setup a virtual host through Apache? If so, let us see that in case there's an issue there. I do this myself on my MacBook without issues.
     
  3. iambron thread starter macrumors newbie

    Joined:
    Apr 28, 2009
    #3
    I am using MAMP for my local development, not using the stock apache that comes with mac. I do set up vhost for my local development but not in this case.

    The host in this question is not on the local environment but on a remote machine with a dedicated ip address.
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Well MAMP installs Apache.

    On the server where the files are hosted is their any configuration that blocks certain access, perhaps based on IP. Also, if there's any hot linking blocks going on for those file types that could be a potential. It was something I ran into once. Otherwise you may want to try and clear the browser cache to ensure it's getting current info.
     
  5. iambron thread starter macrumors newbie

    Joined:
    Apr 28, 2009
    #5
    hmm, i asked a friend to try it on the machine, its working with no problems, i suspect it is my connection which might be causing problems cause i used another connection and it works fine. Might be my router or just the cache working up after all i did restart my mac with the new connection.

    Will try again when i get home later tonight. Hope it works fine if not i am cooked!
     
  6. iambron thread starter macrumors newbie

    Joined:
    Apr 28, 2009
    #6
    tried accessing using my home connection, still the same problem. What is this hotlinking problem you are talking about?

    Anyone knows whats happening? Please enlighten me.
     
  7. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #7
    Hotlinking is where a web site uses resources from another server, generally without consent. Example, a MySpace user may try to link directly to an image on your web server to be display in his MySpace page. Images are the most often hotlinked item on web pages, but can be applied to any file type (including CSS and JavaScript files which I do block).

    You generally want to block this behavior as it uses your bandwidth and the site may be trying to steal your work. I once had someone trying to claim my artwork as their own using this. The nice thing is I can block the hotlink with a .htaccess file and deliver a different image of my choosing when they do this. I deliver the image that says "thief" on it. It can be fun setting this stuff up.

    I'm out of ideas though for your problem. Maybe you or one of the guys there can check the server logs to see if there's any clues there.
     

Share This Page