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


#1

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 ??


#2

bump


#3

bump…AGAIN


#4

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.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#5

that didnt work either…


#6

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


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#7

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


#8

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.


#9

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


#10

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


#11

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.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#12

bump