#1  
Old 13th July 2010, 23:51
tupacsoul tupacsoul is offline
Junior Member
 
Join Date: Mar 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with Hotlinking

Hi.

I have a blog in wordpress with many visits, and many images. This images are being hotlinked by another webs, and this is fatal for my server.

I'm trying to configure in the ISPConfig panel, on "SITES/Configuration/" but the images are still being showed.

How can I do that?

PD: sorry about my poor english.
Reply With Quote
Sponsored Links
  #2  
Old 13th July 2010, 23:57
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

You can do this with .htaccess files.

Example 1 disables hotlinking:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ - [F]
Example 2 disables hotlinking and shows error message:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ http://www.yourdomain.com/error_message.png [R,L]
Reply With Quote
  #3  
Old 14th July 2010, 00:00
tupacsoul tupacsoul is offline
Junior Member
 
Join Date: Mar 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by damir View Post
You can do this with .htaccess files.

Example 1 disables hotlinking:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ - [F]
Example 2 disables hotlinking and shows error message:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ http://www.yourdomain.com/error_message.png [R,L]
Where must I locate this .htaccess ? If I put this on web folder, I get error 500.

All what i've read is that all htaccess sentences must be on ISPCONFIG Panel, on Sites/configuration...
Reply With Quote
  #4  
Old 14th July 2010, 00:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,001
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

If you get a 500 error, look into the error log of the website to see what the reason is.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 14th July 2010, 00:53
tupacsoul tupacsoul is offline
Junior Member
 
Join Date: Mar 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I get the error because in ISPConfig, the HTACCESS must be configured on Sites/options...
Reply With Quote
  #6  
Old 14th July 2010, 00:56
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,001
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

No, thats not the case. You can configure it in a .htaccess file as well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 14th July 2010, 00:57
tupacsoul tupacsoul is offline
Junior Member
 
Join Date: Mar 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh, ok. I'll try. Thanks
Reply With Quote
  #8  
Old 17th July 2010, 00:01
tupacsoul tupacsoul is offline
Junior Member
 
Join Date: Mar 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by till View Post
No, thats not the case. You can configure it in a .htaccess file as well.
Thanks, I found an .htaccess file hidden in the Web folder. Now it's OK.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems installing LAMP - MySQL and PHP5 JosBR Server Operation 5 19th December 2009 22:00
Courierr Errors were encountered while processing AsDsL General 1 30th November 2009 09:03
E: Sub-process /usr/bin/dpkg returned an error code (1) ergti Installation/Configuration 1 16th August 2009 13:36
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 10:11
Empty Recycle Bin jon335 General 40 6th May 2006 12:56


All times are GMT +2. The time now is 03:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.