Can you see this pic?
Testing htaccess
Collapse
X
-
-
-
Fuck! I moved servers and I lost my htaccess files (well, the originals are in Brazil).
Can you guys help me out by pointing out what I have done wrong here?
Options All -Indexes
order allow,deny
allow from all
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.marypussy\.com
RewriteRule (.*) http://www.marypussy.com/$1 [R=permanent,L]
RewriteEngine on
RewriteCond %{HTTP_REFERER} .*fusker*.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ - [F,NC]
ErrorDocument 400 http://www.marypussy.com/
ErrorDocument 403 http://www.marypussy.com/
ErrorDocument 404 http://www.marypussy.com/
ErrorDocument 500 http://www.marypussy.com/
ErrorDocument 501 http://www.marypussy.com/
ErrorDocument 503 http://www.marypussy.com/I'm just a newbie.Comment
-
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?marypussy.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://marypussy.com [R,NC]
ErrorDocument 400 http://www.marypussy.com/
ErrorDocument 403 http://www.marypussy.com/
ErrorDocument 404 http://www.marypussy.com/
ErrorDocument 500 http://www.marypussy.com/
ErrorDocument 501 http://www.marypussy.com/
ErrorDocument 503 http://www.marypussy.com/Comment
-
this assumes null referrers and domain.com and anotherdomain.com are domains that you WANT to be able to hotlink from. If you want to block null referrers just remove the top line.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?anotherdomain.com.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ - [F,NC,L]
Any request for an image from anywhere else will be given a 403 responseComment
-
So a htaccess like this one would be fine? (see below)
order allow,deny
allow from all
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?marypussy.com.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ - [F,NC,L]
RewriteEngine on
RewriteCond %{HTTP_REFERER} .*fusker*.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ - [F,NC]
ErrorDocument 400 http://www.marypussy.com/
ErrorDocument 403 http://www.marypussy.com/
ErrorDocument 404 http://www.marypussy.com/
ErrorDocument 500 http://www.marypussy.com/
ErrorDocument 501 http://www.marypussy.com/
ErrorDocument 503 http://www.marypussy.com/I'm just a newbie.Comment
-
Damn! Really?Originally posted by PR_TomIf you block the null referrer though, alot of firewalls like nortons will block the images too. Pain in the ass.
So what should my .htaccess should look like?
BTW: I don't remember all this stuff from the first time I dealt with my htaccess, it seemed easier.I'm just a newbie.Comment
-
-
Well, assuming the rest of your code is how it needs to be, then make it like this:
order allow,deny
allow from all
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?marypussy.com.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ - [F,NC,L]
RewriteEngine on
RewriteCond %{HTTP_REFERER} .*fusker*.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ - [F,NC]
ErrorDocument 400 http://www.marypussy.com/
ErrorDocument 403 http://www.marypussy.com/
ErrorDocument 404 http://www.marypussy.com/
ErrorDocument 500 http://www.marypussy.com/
ErrorDocument 501 http://www.marypussy.com/
ErrorDocument 503 http://www.marypussy.com/
The null referrer might be ok to block, but if you submit to places who use firewalls, and get rejected because of "broken images", thats likely why.
I also dont know why you'd need your
order allow,deny
allow from all
Since you are not denying from anything. But I'm no expert either.43-922-863 Shut up and play your guitar.
Comment
-
That's how you got that code you showed me, huh??Originally posted by abzjust use this http://www.htmlbasix.com/disablehotlinking.shtml
;)
Will this affect what PR_Tom just told me?I'm just a newbie.Comment
-
RewriteCond %{HTTP_REFERER} !^$
Thats the line that says "If the referrer is NOT Null"
Add it for more protection, but if a reviewer tells you broken images, he/she may have a null referrer due to nortons.43-922-863 Shut up and play your guitar.
Comment
-
I just took that down. htacess should be working now...Originally posted by PR_TomRewriteCond %{HTTP_REFERER} !^$
Thats the line that says "If the referrer is NOT Null"
Add it for more protection, but if a reviewer tells you broken images, he/she may have a null referrer due to nortons.
I'm just a newbie.Comment
-
I allowed GFY on my .htaccess, along with Google.. I'm nutty that wayComment
-
Comment



Comment