Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Stopping hotlinking on windows

Options
  • 13-08-2006 10:55pm
    #1
    Moderators, Politics Moderators Posts: 39,923 Mod ✭✭✭✭


    I know you can on Apache but is it possible to do this on shared windows hosting?


Comments

  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    kbannon wrote:
    I know you can on Apache but is it possible to do this on shared windows hosting?

    You mean you want people to get to a page from a specified location, or host rather than directly from an external site?

    If so, you can do this using the Server Variables collection - Request.ServerVariables("HTTP_REFERER") (note the misspelling) will give you the referring URL, including the hostname.


  • Moderators, Politics Moderators Posts: 39,923 Mod ✭✭✭✭Seth Brundle


    I want to stop people using pics that are hosted on my site, on other sites. I want to save my bandwidth.


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    kbannon wrote:
    I want to stop people using pics that are hosted on my site, on other sites. I want to save my bandwidth.

    Sorry - when I saw "windows", I thought you meant browser windows, not the platform.

    Came across this script based solution, but have no ideas of what's involved.
    http://evolvedcode.net/content/code_antihotlink/

    Failing that, ask your hosting company - it may suit them just as much to configure IIS.


  • Moderators, Politics Moderators Posts: 39,923 Mod ✭✭✭✭Seth Brundle


    nice one. I'll look at that tomorrow.


  • Registered Users Posts: 2,157 ✭✭✭Serbian


    You could also try using ISAPI Rewrite which is essentially mod_rewrite for Windows. If it's a dedicated server I would recommend purchasing the module, otherwise just use the free one. They also have a program specifically written to prevent hotlinking but I'm pretty sure you can do it with the ISAPI Rewrite extension by itself.


  • Advertisement
Advertisement