htaccess link protection, doesnt work!!! <--------

htaccess link protection, doesnt work!!! <--------

Posted by: doorsteppa
Posted on: 2006-09-07 11:43:00

ok, my site is www.halo-videos.com and i want to prevent direct linking to my videos (in /videos ) so.
i created my htaccess file, the code is below:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?halo-videos.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?halo-videos.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?doorsteppa.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?uploadcrap.com(/)?.*$ [NC]
RewriteRule .*.(mpg|wmv|mov|rm|avi|flv|mpeg|MPEG|WMV|AVI|MOV|RM|FLV)$ http://www.halo-videos.com/no_hotlinking_son.php [R,NC]
ErrorDocument 404 /error_pages/404.php
ErrorDocument 403 /error_pages/403.php
ErrorDocument 500 /error_pages/500.php
ErrorDocument 503 /error_pages/503.php
Options All -Indexes


this worked on my other site hosts but not with DH (wtf), ive tried using the "link protection" in the control panel and this also does NOTHING!!,

can anyone help ??

Re: htaccess link protection, doesnt work!!! <----

Posted by: doorsteppa
Posted on: 2006-09-07 13:52:00

bump

Re: htaccess link protection, doesnt work!!! <----

Posted by: doorsteppa
Posted on: 2006-09-08 05:22:00

bump..AGAIN

Re: htaccess link protection, doesnt work!!! <----

Posted by: scjessey
Posted on: 2006-09-08 06:38:00

Try it like this:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www.)?halo-videos.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .(mpg|wmv|mov|rm|avi|flv|mpeg)$ no_hotlinking_son.php [L]

And "bumping" is annoying. Don't get angry just because people haven't answered your post.

Re: htaccess link protection, doesnt work!!! <----

Posted by: doorsteppa
Posted on: 2006-09-08 13:16:00

that didnt work either...

Re: htaccess link protection, doesnt work!!! <----

Posted by: scjessey
Posted on: 2006-09-08 15:35:00

In reply to:

that didnt work either...


No? Oh well. I apologize for being so useless.

Re: htaccess link protection, doesnt work!!! <----

Posted by: doorsteppa
Posted on: 2006-09-08 16:43:00

not your fault, its this hosting company, the file works elsewhere O_o

Re: htaccess link protection, doesnt work!!! <----

Posted by: BrandonOBrien
Posted on: 2006-09-08 16:54:00

Hey, I ran into the same problems you are.

simple htaccess commands that should work anywhere don't seem to work here.

I'm switching out of dreamhost and going to lunarpages. I can't take this crap anymore.

Re: htaccess link protection, doesnt work!!! <-

Posted by: guice
Posted on: 2006-09-08 16:59:00

oh...now posting work. deleted, gotta rethink post.

Re: htaccess link protection, doesnt work!!! <-

Posted by: silkrooster
Posted on: 2006-09-08 19:54:00

Question for Simon
Shouldn't the rewrite rule be a redirect? Is the last rule command needed when only one rule is applied?
OK a couple of questions. lol. I only ask to learn not to undermine what you know.
Silk

My website

Re: htaccess link protection, doesnt work!!! <-

Posted by: scjessey
Posted on: 2006-09-09 05:02:00

In reply to:

Shouldn't the rewrite rule be a redirect? Is the last rule command needed when only one rule is applied?


I don't know much about mod_rewrite. In order to answer the post above, I just modifed stuff that is already in the wiki, which in turn came from studying I did for a specific need.

Re: htaccess link protection, doesnt work!!! <-

Posted by: doorsteppa
Posted on: 2006-09-09 13:04:00

bump

Tags: link protectionhtaccess