|
2005-05-24, 09:59 AM | #1 |
You can now put whatever you want in this space :)
Join Date: Sep 2004
Location: Next door to a kid with a moped.
Posts: 1,492
|
.htaccess problem
So I tried to prevent hotlinking of my mpegs with .htaccess and when i tried to play the movies on the site I got an error msg from WMP saying the server was busy and could not connect. The page loaded fine.
This is my .htaccess document: RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://www.quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com/.*$ [NC] RewriteCond %{REMOTE_ADDR} !^68\.169\.210\.217$ RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mp3|mpg|mov)$ - [F,NC] Options -Indexes Order Allow,Deny Allow from all Deny from flabber.nl Deny from in.ua Deny from chatropolis.com Deny from cs7.chatropolis.com Deny from forumer.com Deny from link0777.com Deny from reapersbondage.com Deny from urban.ne.jp Deny from dongtaiwang.com Deny from fn.com.ua Deny from chatcannon.de Deny from monik.cz Deny from adultchatnetwork.com Deny from sexloupe.com Deny from zhonghua999.com Deny from 212.83.120.133 Deny from fn.in.ua And this is the movie page: http://desktopwanker.com/freesites/m...gallery_01.htm I really can't see anything wrong with it, but then I really don't know what I'm doing. I just pieced together the .htaccess from an online tutorial. Can somebody help out? BTW the movies are working now, I took down the .htaccess. Thanks
__________________
BUY MY PORNSITES! |
2005-05-24, 10:12 AM | #2 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
First of all, you are doing:
deny from .domain.com This may not do what you think it does especially since I see some names in there that are probably meant to block hotlinking from those sites in particular. But, that's not where this particular .htaccess rule is killing you. Because you have a deny from .domain.com, you are forcing apache to do a reverse DNS lookup on EVERY request for every file served under that .htaccess. If you get hit with a ton of hotlinking, apache waiting for the DNS resolution will hold open threads and possibly exceed maxclients while it is trying to see if it should allow the person. I would bet if you removed the deny from statements, while it isn't the best set of rules, the machine would run much better and you would be rid of your server busy messages. Exceeding MaxClients will give the Server Busy message.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
2005-05-24, 10:21 AM | #3 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
http://desktopwanker.com/freesites/m...gallery_01.htm
Movies play for me. Using Safari with QuickTime. |
2005-05-24, 10:33 AM | #4 |
You can now put whatever you want in this space :)
Join Date: Sep 2004
Location: Next door to a kid with a moped.
Posts: 1,492
|
I tried what you said cd34 and trimmed the .htaccess to this:
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://www.quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com/.*$ [NC] RewriteCond %{REMOTE_ADDR} !^68\.169\.210\.217$ RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mp3|mpg|mov)$ - [F,NC] And the same thing happens "Windows Media Player cannot connect to the server. The server name may be incorrect or the server is busy. Try again later." Cleo, they played because I took down the .htaccess. I'm not leaving it there as long as it fucks things up.
__________________
BUY MY PORNSITES! |
2005-05-24, 10:37 AM | #5 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Do a test directory with a page of movies and your htaccess.
This is how I do mine and it seems to work without problems, scroll about 2/3 of the ways down on the page. http://www.cleos-porn-links.com/adul...aster-help.php |
2005-05-24, 10:43 AM | #6 | |
You can now put whatever you want in this space :)
Join Date: Sep 2004
Location: Next door to a kid with a moped.
Posts: 1,492
|
Quote:
__________________
BUY MY PORNSITES! |
|
2005-05-24, 10:55 AM | #7 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
oh, haha, sorry. Put this at the top.
RewriteCond %{HTTP_REFERER} !^$ [NC] Windows Media Player does not send a referrer.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
2005-05-24, 10:59 AM | #8 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I just came back to the computer to post that mine, unlike yours, allows for no referral but I see that cd34 beat me to it.
|
2005-05-24, 11:42 AM | #9 | |
You can now put whatever you want in this space :)
Join Date: Sep 2004
Location: Next door to a kid with a moped.
Posts: 1,492
|
Quote:
RewriteCond %{HTTP_REFERER} !^$ Either way Cleo's code produces a 404, BUT it works fine on a different server so I'm beginning to think that this has something to do with the server configuration. I'm getting in touch with support at my host. Thanks guys!
__________________
BUY MY PORNSITES! |
|
2005-05-24, 11:49 AM | #10 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
[NC] - ignore case
So you do not need the NC on a line just telling it that no referral is ok. |
2005-05-24, 11:49 AM | #11 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.quantumporn.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.we-r-sex.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.planetofporn.net/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.lustylemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.whothefuckislemmy.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://subdomain.desktopwanker.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://yahoo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.google.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://google.com/.*$ [NC] RewriteCond %{REMOTE_ADDR} !^68\.169\.210\.217$ RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mp3|mpg|mov)$ - [F,NC] That should work.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
2005-05-24, 12:11 PM | #12 |
You can now put whatever you want in this space :)
Join Date: Sep 2004
Location: Next door to a kid with a moped.
Posts: 1,492
|
Thanks cd34, that works!
__________________
BUY MY PORNSITES! |
2005-05-24, 12:18 PM | #13 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
my brain is mush this week re: the [NC] on the empty referrer.
Although, people with lowercase empty referrers might have been able to slip by with Cleo's rule. Note: For the comedically and/or technically impaired, an empty referrer has no case. It is an attempt at humor. A poor attempt, but an attempt nonetheless to cover up for my sleep-deprived mushy brain.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
|
|