vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Protect avatars and attachments using mod_rewrite (https://vborg.vbsupport.ru/showthread.php?t=64247)

DenzoForums 04-22-2004 04:21 PM

Protect avatars and attachments using mod_rewrite
 
I posted this over at vbulletin.com also, but i got pointed to an old thread that didn't have a working answer.

http://www.vbulletin.com/forum/showthread.php?t=19021

Anybody here know how to do this with htaccess?

Thanks
Dave

DenzoForums 04-26-2004 11:53 PM

Anybody??? I need some help with this..

Thanks
Dave

Liquid1ce 04-28-2004 03:22 AM

make a file called .htaccess & add the following then upload to your root dir

Code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://ServerIP/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://ServerIP$      [NC]
RewriteCond %{HTTP_REFERER} !^http://YourSite.org/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://YourSite.org$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.YourSite.org/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.YourSite.org$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|zip|rar|mpg|mp3)$ http://www.SomeOtherSite.org/Theif.gif [R,NC]

The RewriteRule Are the extensions you want protected

DenzoForums 04-28-2004 01:28 PM

OK.. I will give it a whirl.. but how do i findmy ip address? My host seems to be sleeping at the wheel, and never answers my requests for help..

note to self: Must look into new hosting company.

Thanks Dave

Sketch 04-28-2004 01:44 PM

Windows > Start > Run > cmd

ping www.yourdomain.com

DenzoForums 04-28-2004 02:52 PM

Quote:

Originally Posted by Sketch
Windows > Start > Run > cmd

ping www.yourdomain.com

Thanks for the ip..
.. now how do i test this to see if it works.

i tried [img] place my url for image here? [/img] .. but this doens;t seem to work. I still see the picture..

EDIT - Also where am i putting this? I put it oin the root for my domain..
Thanks
Dave

DenzoForums 04-28-2004 02:54 PM

http://www.denzoforums.com/forum/att...tachmentid=289

this is using the img tag.. it show as a link, instead of showing the image.. any reason?

1 more try..

http://www.denzoforums.com/forum/ima...ttons/edit.gif

OK.. this is not working either then..

Liquid1ce 04-28-2004 04:23 PM

have you set in admincp to allow the [ img ] tag ?

also http://www.bytenix.net Have VERY Cheap hosting if your after new hosting

DenzoForums 04-28-2004 04:32 PM

Quote:

Originally Posted by Liquid1ce
have you set in admincp to allow the [ img ] tag ?

Why would this matter? I am trying to protect my images from hotlinking to someone elses websites. as you can see in the post above, i was able to display an image hosted on my site directly in the post above. The .htaccess mod doesn;t seem to be protecting my image.

Thanks
Dave
P.S. I will look at the host. Do you host there? Are they in the U.S? how's the support?

Liquid1ce 04-28-2004 04:42 PM

RewriteEngine needs to be on

& you'll see the image as you have the cookie from your site-

As for the hosting yes im hosting there & support is very good
the servers are in the us yea

DenzoForums 04-28-2004 04:51 PM

Quote:

Originally Posted by Liquid1ce
RewriteEngine needs to be on

& you'll see the image as you have the cookie from your site-

As for the hosting yes im hosting there & support is very good
the servers are in the us yea

ok.. do you see the image above? the edit image a few posts above?

doesn;t the .htaccess file add rewriteengineon?

Thanks
Dave

Liquid1ce 04-28-2004 04:57 PM

no RewriteEngine needs to be added or commented out in the apache httpd.conf

& yeah i see the file-
The host i use bytenix.net auto protect your imgs from hotlinking

DenzoForums 04-28-2004 04:58 PM

Quote:

Originally Posted by Liquid1ce
no RewriteEngine needs to be added or commented out in the apache httpd.conf

& yeah i see the file-
The host i use bytenix.net auto protect your imgs from hotlinking

ok.. that's my problem.. i can't edit my httpd.conf file.. thus partly why looking for new host..

Thanks!

DenzoForums 04-28-2004 05:35 PM

thanks for the tip of the host.. I just had a look and a chat.. Also a demo of the cpanel admin area..

I am switching to them as we speak..

Thanks again!!

Dave

Maikel 04-29-2004 08:20 AM

i use this one

PHP Code:

RewriteEngine on
RewriteCond 
%{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://YOURDOMAIN.COM.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.YOURDOMAIN.COM.*$ [NC]
RewriteRule /* [url]http://www.YOURDOMAIN.COM/stolen.jpg[/url] [R,L] 



All times are GMT. The time now is 04:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01133 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete