Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Deny a domain with htaccess?

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  soap and webservices on windows  
Author Message
kent64

External


Since: May 21, 2004
Posts: 2



(Msg. 1) Posted: Fri May 21, 2004 4:07 pm
Post subject: Deny a domain with htaccess?
Archived from groups: alt>apache>configuration (more info?)

Can I use an htaccess file to block all referrers from a specific domain or
can I only block specific users by the IPs their ISPs assign them?

I have a domain in Japan that has linked one of my pages and is burning my
bandwidth. Is it possible to give an error page to every surfer visiting
that site/domain who decides to click on the link to my site?

Thanks. I know nothing about Apache except that it's the OS my webhost says
is on my server.

 >> Stay informed about: Deny a domain with htaccess? 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Fri May 21, 2004 4:10 pm
Post subject: Re: Deny a domain with htaccess? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Kent64 <kent64.RemoveThis@hotmail.com> wrote:
 > Can I use an htaccess file to block all referrers from a specific domain

Sure, just block the whole domain.

 > I have a domain in Japan that has linked one of my pages

I don't think that is a domain that linked your page, just one site
maybe. I'd just move the page to another location. If it's so interesting
maybe you can have them pay you to have the link...

 > I know nothing about Apache except that it's the OS my webhost

Apache isn't an OS, is a web server...

Davide

--
| NAPOLEON: What shall we do with this soldier, Guiseppe? Everything he
| says is wrong. GUISEPPE: Make him a general, Excellency, and then
| everything he says will be right.
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Deny a domain with htaccess? 
Back to top
Login to vote
kent64

External


Since: May 21, 2004
Posts: 2



(Msg. 3) Posted: Sat May 22, 2004 12:51 am
Post subject: Re: Deny a domain with htaccess? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Apache isn't an OS, is a web server...


I told you I knew nothing about Apache Smile Blocking a domain doesn't work
and seems to be the wrong method to use here. I can't change the page but
wish I could.

I used this block referrer script and it's working but my stats tell me half
are being redirected and half are still downloading my page and bandwidth.
Not sure how to block or redirect everyone who's clicking my link from that
website?
----------------------------------
Options +FollowSymLinks

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.blockeddomain.com [NC]
RewriteRule /* <a style='text-decoration: underline;' href="http://www.mydomain.com/" target="_blank">http://www.mydomain.com/</a> [R,L]
----------------------------------

Thanks.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Deny a domain with htaccess? 
Back to top
Login to vote
invalid5

External


Since: May 09, 2004
Posts: 17



(Msg. 4) Posted: Sat May 22, 2004 9:06 am
Post subject: Re: Deny a domain with htaccess? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Kent64" <kent64.RemoveThis@hotmail.com> wrote in
news:yanrc.4479$be.1597@newsread2.news.pas.earthlink.net:

 > Thanks. I know nothing about Apache except that it's the OS my
 > webhost says is on my server.

htaccess can do many things. but this might be something you should talk
to your host about as it affects them as well. at the least they might be
able to help you set up what you need.

you can deny domains (deny from microsoft.com) and IP addresses (deny from
xxx.xxx.xxx.xxx). But, from what it sounds like the traffic is not coming
from that domain, people are just being directed to you via it. An example
would be those image search engines like google has. If your problem is
that people are linking to your images, or certain types of pages, you can
make it so that they will only be available when viewed directly from your
site.

Lastly, if it is only one page... maybe the simplest thing to do is to
change its name... and the links that way

some info at <a style='text-decoration: underline;' href="http://www.hostingmanual.net/other/htfun.shtml" target="_blank">http://www.hostingmanual.net/other/htfun.shtml</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Deny a domain with htaccess? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
htaccess deny all ip accept some? - I'm totally new to Apache and .htaccess so take it easy... I want to deny all access to my web server except some specified ip addresses that i want to allow, how do i do that? my Apache 2 is under g:\web-server/apache 2/apache group, where do i put the....

auto deny - Is there a way to auto deny anyone that is silly enought to type in ...%255 etc>? Getting tired of this bs.

Deny not allowed here - I get this error when I try to set op a restriction i .htaccess: Deny not allowed here What is wrong ?

allow,deny groups? - Hi, Is it possible to create a group that contains all the IP & domains that I want to allow access, and simply state in a <directory> allow from group1 or similar? Thanks Rich.

Deny access to all directories named "CVS"? - Can someone give an example of how to deny access to all directories named "CVS" that may exist in a site using a single .htaccess in the site's root? If it's also possible to specify that this particular directive is not to be overriden by ne...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]