Web Hosting Talk







View Full Version : Problems with a .htaccess file


Cymedia
05-09-2002, 07:38 PM
I have the following code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC]
RewriteRule .*\.(avi|AVI|gif|GIF|jpg|JPG)$ - [F]

and i want to protect my movies so they dont be hot link.
But when i upload this i can't download the movies.
Any solutions??

ngc1977
05-09-2002, 11:27 PM
I got an .htaccess that bands hotlinking to most file extensions. Write back and I will e-mail you a copy.

Cymedia
05-09-2002, 11:50 PM
Can you send it to my email please.
Thank You

Spunky
05-10-2002, 08:02 AM
Just needing a special .htaccess file too. As my host doesn't automatically support the creating of subdomains, I want to setup a .htaccess file for that. So when a user types in:

http://whatever.mydomain.com

He gets redirected to:

http://www.mydomain.com/whatever

Would be great if anyone of you has this script. Will this be possible too using .htaccess?

http://i.can.write.anything.here.mydomain.com

to

http://www.mydomain.com/here

???

Thanks a lot