|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Guest
Posts: n/a
|
Quick htaccess redirection question
This is how my current htaccess looks like
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://domain.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.domain.com.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://domain.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.domain.com:80.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://xx.xx.xx.xx.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://xx.xx.xx.xx:80.*$ [NC] RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://www.domain.com/error404.html RewriteCond %{HTTP_REFERER} ^http://.+\.sex-top.ru/* [NC] RewriteRule .*$ http://www.domain.com/error404.html The first part is obviously for hotlink protection, and the second RewriteCondition/Rule combo should actually cause all traffic from sex-top.ru to get redirected to the error404.html page, however it is not working. Am I missing some arguments? ![]() |
|
|
|
#2 |
|
Guest
Posts: n/a
|
this just causes the hits from sex-top.ru to wait. It doesn't get redirected.
|
|
|
|
#3 |
|
Will code for food...
Join Date: Apr 2001
Location: Buckeye, AZ
Posts: 8,496
|
because your 404 file also has the protection and keeps forwarding, getting into an infinite loop
__________________
|
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: May 2002
Location: Oslo, Norway
Posts: 748
|
I was wondering the same thing. Currently, I use this .htaccess to redirect a certain domain:
setenvifnocase Referer "^http://www.leechingfuck.com" spam_ref=1 <FilesMatch "(.*)"> Order Allow,Deny Allow from all Deny from env=spam_ref </FilesMatch> This produces a 403, the 403 then sends this to my index.html, rather than a gallery page. My problem however is resources: Those fucking leeches send me like 150k on a bad day & this bogs down on my server resulting in huge load situations. Anybody with a better solution? |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
I'll just place the 404 on another domain then.
|
|
|
|
#6 | |
|
Confirmed User
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
|
Quote:
In fact, the only .htaccess files on a dedicated box should be temporary test files. Once the code is working properly, it should be transferred on into access.conf. Place it appropriately within a vitual host, directory or file block to control it's usage.
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A> <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER> |
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
|
Oh, and for the greatest boost in performance, once you've cleared out your .htaccess files and placed their code within access.conf, you can stop having Apache look for them!
Just find the line in access.conf that starts with "AllowOverride", comment it out (place a "#" w/o the quotes in front of the line) and on the next line add: "AllowOverride None" (w/o the quotes). Whenever you do need to test new code, delete the "#" from the start of the original line and add it to the front of "AllowOverride None". This is a tremendous performance boost, because if the server is expecting .htaccess files on your system, each and every request that comes in results in it looking for one, starting from the top-most directory above and working it's way down to where the file resides. If you're smart enough to get rid of those .htaccess files, tell your server that there's no need to look for 'em anymore!
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A> <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER> |
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: May 2002
Location: Oslo, Norway
Posts: 748
|
Man, thanks for the advice. I will do exactly that!
|
|
|
|