> Ubuntu webserver prevent hotlinking, other meethod than using .htacc


Recommended Posts

I have my own webserver (Ubuntu LAMP)

and would like to prevent images in my server from being hotlink outside my domain.

is there any possible way besides using .htaccess?(because i couldnt get it to work)

I tried .htaccess but got Error 500 on all the normal .php or .htm page i try to view.

Link to comment
Share on other sites

That is how you would do it -- what info did you follow in setting up your .htaccess

Sounds like you got something wrong with your .htaccess file is all. Can you post what you did?

Link to comment
Share on other sites

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.kinsei.my/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.kinsei.my$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|swf)$ http://www.kinsei.my/images/nohotlink.jpe [R,NC]

this is whats in my .htaccess file

it is located in one of my virtual host main "public_html" folder

/home/user/public_html/website.my/www

internalservererrorsy9.th.jpg

when .htaccess is enable the error above comes out when i go to my website "http://website.my" from my browser

*website.my is not my actual domain, just a sample.*

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.