Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2008

    need help in changing code to lighthttpd htaccess from apache

    on my friend's vps, he has some serious trouble with users mis-using hot-linking feature, so he wants some restrictions to b set via htaccess

    He has given me a code which is used for htaccess in apache, but he wants this to work in lighthttpd, I am not sure if this would work in lighthttpd htaccess,

    this was the code given to me to b worked on:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    #allow hotlinking for thumbnails
    RewriteCond %{REQUEST_URI} !_thumb
    #allowed website to hotlink  (don't forget to add your own site !!)
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?*$ [NC]
    #display no-hotlink.jpg instead of the requested image
    RewriteRule \.(jpg|jpeg|gif|png|bmp|ico)$ [NC,R,L]
    can any one help me for getting this code re-written for lighthttpd version htaccess file and where to enter this code -- using hypervm/kloxo on his vps

  2. #2
    Join Date
    Mar 2008
    hi is there any one who could help me in rewriting this code for lighthttpd interface from apache rewrite code

  3. #3
    This isn't a direct replacement for what you have, but will do most of what you want:

    $HTTP["referer"] !~ "^(http://(.*)\.?domain\.com/)" {
            url.redirect = ( "(.jpg|.jpeg|.gif|.bmp|.png|.ico)" => "" )
    } - Fast. Reliable. Affordable.
    Shared Hosting | Dedicated Servers | Colocation | Managed Cloud | AS53255

  4. #4
    Join Date
    Mar 2008
    express colo - thanks for the rewrite code, but ur code will block hotlinking to all images, my friend wants to block only full size images, he wants thumbnails to be visible in other sites

  5. #5
    Join Date
    Nov 2001
    Just add a negative condition inside the referrer condition loop for "_thumb" in the URL.
    “Even those who arrange and design shrubberies are under
    considerable economic stress at this period in history.”

  6. #6
    Join Date
    Mar 2008
    hey watkins, I have no clue how to make commands for lighthttpd, apache is ok can be handled but not lighthttpd,
    and its not just 1 negative statement for thumbs but , its 1 more,,.. to allow 1 domain to hotlink full size images too.. thtz wat was my friend's need

Similar Threads

  1. Help! Convert .htaccess to lighthttpd rewrite rule
    By omega36 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 06-07-2007, 01:04 AM
  2. Apache or Lighthttpd?
    By ~Alvin~ in forum Dedicated Server
    Replies: 30
    Last Post: 05-26-2007, 10:12 PM
  3. Who uses apache / lighthttpd
    By cspence in forum Web Hosting
    Replies: 26
    Last Post: 05-18-2007, 05:47 PM
  4. Lighthttpd vs Apache
    By IceCreamMan in forum Web Hosting
    Replies: 7
    Last Post: 10-13-2006, 11:00 PM
  5. changing htaccess?
    By Applied in forum Web Hosting
    Replies: 8
    Last Post: 04-13-2004, 12:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts