View Full Version : htaccess mods
ADIDAS
12-28-2001, 03:28 PM
Hey guys, I have a question, I run a couple sites and want to share the content on each with each other, what I was wondering is does anyone know how to allow this thru .htaccess that ALLOWS .mov & .wmv files to be viewed? Thanks in advance!
Mogul
12-28-2001, 03:36 PM
You could mod the htaccess to look for a cookie key and value.
If it exists, the movie will play. if not, it will send to your bad url.
justsexxx
12-28-2001, 03:40 PM
well this works for pictures....I think also for movies
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^http://w*\.*domain1.com
RewriteCond %{HTTP_REFERER} !^http://w*\.*domain2.com
RewriteCond %{HTTP_REFERER} !^http://w*\.*domain3.com
RewriteCond %{HTTP_REFERER} !^http://w*\.*domain4.com
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.domain.com/nodirect.html
Andre
ADIDAS
12-28-2001, 03:40 PM
Yes but not sure how to do that even. Thanks!
ADIDAS
12-28-2001, 03:45 PM
Justsexxx I want to be able to allow people INTO the site, with the Jpg And Gif options avail as well as .mov .wmv files enabled!
Tried what you posted and it didnt work!
ADIDAS
12-28-2001, 04:00 PM
Here is exactly what I am looking for.
A surfer goes to my site www.1domain.com/members (http://www.1domain.com/members) and I want to give him access to www.othervideodomain.com/members/vids/index.html (http://www.othervideodomain.com/members/vids/index.html) I want to do this without him being prompted for a password or other protection method. If he book marks it I want him to be prompted for the password...
Does that make sense?
justsexxx
12-28-2001, 04:25 PM
sorry, thought that you wanted to use your images/movies on all domains...
Andre
ADIDAS
12-28-2001, 04:31 PM
Nope just mine. Thanks though.
ADIDAS
12-28-2001, 05:34 PM
You know I have done everything to get this thing working! It must be my host! I am going to have to change to a dedicated system and do the mod in apache!!!!!!!!
richard
12-28-2001, 07:10 PM
i'm sure you can do this with .htaccess.
gimme 10...
ADIDAS
12-28-2001, 07:22 PM
Richard, hti me up on ICQ, and I can let you know the EXACT sites I need it from.
ICQ #125094296
richard
12-28-2001, 08:27 PM
Place code inside a .htaccess file, in the directory you wish to protect/allow access to.
SetEnvIf Referer "^http://domain-1.com/" myref=1
SetEnvIf Referer "^http://domain-2.com/" myref=1
<FilesMatch ".(gif|jpg|mpeg|avi|etc)">
Order Allow,Deny
Allow from env=myref
</FilesMatch>
limitations:
http_referer based authentication can be spoofed.
only "http://domain-1.com" would work, not "http://www.domain-1.com" (there is regex to change this, but you can look it up if that is important).
Enjoy.
Rich.
ADIDAS
12-29-2001, 04:04 AM
Since this is stopping my .wmv & .mov fiels from working, can this be done with a cgi script?
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.