View Single Post

  #1 (permalink)  
Old 04-20-2008, 05:21 PM
Lizard King Lizard King is offline
Junior Member
User
 
Join Date: Jul 2007
My distro: CentOs
Posts: 4
Rep Power: 0
Lizard King is on a distinguished road
Default Lighttpd Hotlink Prevention

Hello ,

I had a problem when i tried to integrate hotlink protection to my conf.

My current lighttpd.conf file is as follow. How shall i add the hotlink prevention code ? What ever i do i always get an error while restarting lighttpd. I tried using Lighttpd prevent image hotlinking or leeching or direct linking

Code:
$HTTP["host"] =~ "^www.ayyas\.com$" {
server.document-root = "/home/lighttpd/ayyas.com/html"
server.errorlog = "/var/log/lighttpd/error_ayyas.log"
accesslog.filename = "/var/log/lighttpd/access_ayyas.log"
url.rewrite-once = (
"^/(sitemap.*\.(xml|txt)(\.gz)?)$" => "/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1",
"^(/(attachments|orange|phpmyadmin|mina|highslide|xcache|geek|gars|stats|ajaxtabs|mert|blizzard|serenity|cey|arcade|mysmiliesvb|admincp|modcp|clientscript|cpstyles|images|sonstil|kirmizi|files|galeri|vampir|summer|avatars|attachments|custompics|customavatars|favicon)/.*)$" => "$1",
"^/(archive/.*)$" => "/vbseo.php?vbseourl=$1",
"^(.*(clear\.gif|favicon\.ico))$" => "$1",
"^/(.+)\?(.*)$" => "/vbseo.php?vbseourl=$1&$2",
"^/(.+)$" => "/vbseo.php?vbseourl=$1"
)
server.error-handler-404 = "/404.php"
}
$HTTP["host"] =~ "^ayyas\.com$" { url.redirect = ( "^/(.*)" => "http://www.ayyas.com/$1" ) }
Reply With Quote