Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2007-11-09, 06:10 PM   #1
NY Jester
ICQ:147*079*406
 
NY Jester's Avatar
 
Join Date: Oct 2007
Location: Rock*ME*Hardplace
Posts: 2,996
Send a message via ICQ to NY Jester Send a message via AIM to NY Jester
.htaccess

Hey all, I wanted to set up my directories for custom error pages as well as my image directory from hotlinking or image thieves, here is what I have ..

for the error pages

ErrorDocument 402 http://www.my-site.com/error/index.htm
ErrorDocument 403 http://www.my-site.com/error/index.htm
ErrorDocument 404 http://www.my-site.com/error/index.htm
ErrorDocument 405 http://www.my-site.com/error/index.htm
ErrorDocument 500 http://www.my-site.com/error/index.htm

and for the hotlinking issue

RewriteEngine On
RewriteCond %{HTTP_REFERER} !http://www.my-site.com
RewriteCond %{HTTP_REFERER} !http://my-site.com
RewriteRule /* http://www.my-site.com/free-image-area/index.htm



Thanks
J-

__________________
The Sexy Side of Porn
NY Jester is offline   Reply With Quote
Old 2007-11-09, 06:29 PM   #2
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Almost

Code:
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com:80.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com:80.*$ [NC]

RewriteRule (gif|jpg|png|swf|mpg|avi|GIF|JPG|PNG|SWF|MPG|AVI)$ http://www.yourdomain.com/bad.html [R,L]

ErrorDocument 400 http://www.yourdomain.com/404.html
ErrorDocument 401 http://www.yourdomain.com/401.html
ErrorDocument 403 http://www.yourdomain.com/403.html
ErrorDocument 404 http://www.yourdomain.com/404.html
ErrorDocument 501 http://www.yourdomain.com/501.html
ErrorDocument 502 http://www.yourdomain.com/502.html
ErrorDocument 503 http://www.yourdomain.com/503.htm
I have a rather old page of notes over here
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2007-11-09, 06:41 PM   #3
NY Jester
ICQ:147*079*406
 
NY Jester's Avatar
 
Join Date: Oct 2007
Location: Rock*ME*Hardplace
Posts: 2,996
Send a message via ICQ to NY Jester Send a message via AIM to NY Jester
Cleo, thanks, I almost had it. And would that be almost the same thing for a certain directory only accepting entry from either your domain or a particular domain such a as an AVS link site etc? The {HTTP_REFERER} action?

Thanks

J-

__________________
The Sexy Side of Porn
NY Jester is offline   Reply With Quote
Old 2007-11-10, 09:20 AM   #4
Maria
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Aug 2006
Posts: 25
Hi, I was doing some searching myself a while ago and read this article on webmasterworld.com about the correct format for redirecting a 404 error.
One of the things I read was this :

<<An errorDocument directive specifies what file to serve when each particular error number occurs in the server. You must NOT include the http:// or point to another server, otherwise you will NOT get the correct http error code sent back (404 will be returned as 302 in fact).>>

Hope this helps.

In my case I have:
ErrorDocument 404 /404.html

Else your 404 will look like a redirect to Google and other searchengines
Maria is offline   Reply With Quote
Old 2007-11-10, 04:51 PM   #5
NY Jester
ICQ:147*079*406
 
NY Jester's Avatar
 
Join Date: Oct 2007
Location: Rock*ME*Hardplace
Posts: 2,996
Send a message via ICQ to NY Jester Send a message via AIM to NY Jester
Well, for the most part. I believe 404 errors on adult web sites are usually "sneaky" surfers trying to by-pass the advertising and get straight to the good stuff. I mean we could never make a mistake and have a bad link Especially when using TGP traffic, if you have a directory of ..tgp/nov/gallery1.htm alot will try and look for gallery2.htm and so on. |badidea| In that case, I dont really care what error my server shows, but I want to try to get that surfer to a sponsor, whether it be through free email sign up, free trial or $1 trial. He was hunting for something for nothing, now he's going to have to work to get back to the good stuff. LOL I want him/her clicking just enough that he breaks down and gets me the sale.

J-

__________________
The Sexy Side of Porn
NY Jester is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:52 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc