|
|
|
|
|
|
![]() |
#1 |
ICQ:147*079*406
|
.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 |
![]() |
![]() |
![]() |
#2 |
Subversive filth of the hedonistic decadent West
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 |
![]() |
![]() |
![]() |
#3 |
ICQ:147*079*406
|
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 |
![]() |
![]() |
![]() |
#4 |
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 |
![]() |
![]() |
![]() |
#5 |
ICQ:147*079*406
|
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
![]() ![]() ![]() ![]() J- ![]()
__________________
The Sexy Side of Porn |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|