Please help - trying to block specific sites from certain URLs
I'd really like to block traffic to my site from certain other ones. I've been able to do it in the past by modifying the .htaccess file, but it only blocks people from visiting the main URL of my site - i.e., thisismysitesurlDOTcom.
The problem is, I really need to block traffic from specific sites to certain entries in my journal - the URL is like this:
thisismysitesurlDOTcom/journal/archives/0000.html (with the digits at the end just representing different journal entries.)
I've tried everything I can, including different threads on this forum about how to redirect traffic, but none of it works - when I test the link to my site from the one I'm trying to block, it just goes exactly where its linked to. I can still only block people from going to my site's main URL.
Can anyone help me with this? I'd really appreciate it.
PS: I'm very, very sorry if this posts more than once. I keep having to go back and fix it because the forum won't let me post URLs yet.
I tried blocking the sites in the .htaccess file in the "archives" directory, but it still didn't work. Is that the same as what you're saying?
I'm not even sure what the right modifications to make in the .htaccess file are - I've tried everything I've found on different sites, and none of it has worked. If someone could tell me exactly what it is I should be putting in the .htaccess file was I'd really appreciate it.
Actually, I think my wording in the original post is at fault here - I'm being stupid because I'm frustrated and not thinking straight!
I don't mind blocking access to my ENTIRE site from the ones I want to eliminate traffic from, but I can only seem to block it from the main URL - as in thisismysitesurlDOTcom. I don't want to block specific entries so much as I want to block EVERYTHING, but I have no idea why I didn't just phrase it that way in the first place. This is not my day, ha.
Ok, so you want to have the entire site blocked from people that don't have a user name/password?
If so, you can do this in your hosting control panel. If you have cpanel you can use the Password Protect Directories. To do all of them, simply pick any of the directories on the list and back space the last /word/ so you can block the root.
If not, I'm not really sure what you want to do. I'm confused.
Basically I just want to block people visiting the ENTIRE site from one or two other sites that are currently linking to mine. That's all. I don't want to do username/password protection, just block people coming to the site from links that have been posted on a couple of forums.
Thanks for the help. Sorry if I'm not being clear!
I did what dan_erat said and went to the spywareinfo site. I edited the .htaccess but I still have the same problem - it blocks links to the main url of my site, but not any links to journal entries. Argh! I have no idea how to make it block EVERYTHING...
If anyone has any ideas I'd appreciate hearing them!
Lesli/living, I'd do the forbidden message method but my forbidden page has a link back to my site, which sort of defeats the purpose. Thanks for the help, though - I really appreciate it, really!
Crisiszine, that Powweb link contains a way to route those people to a different URL entirely. You could send them off your site - or right back to the site where they came from.
As to why the .htaccess prohibition won't work for subdirectories, it was my understanding that all subdirectories were governed by any .htaccess file rules in the directories above them. I don't know why it isn't working for you. That seems a bit odd.
Just out of curiosity, why are you trying to block traffic from that one site? Bandwidth suckers? Or you don't want your content to be seen by people coming from that site?
If it's the latter, then put your site behind a registration link and require registration for all readers - or take the content down. Publishing on the Internet is like shouting from a streetcorner. If you don't want everyone-and-I-mean-everyone to read it, don't publish it. I don't know of any way to totally block visitors from a specific URL short of the two solutions I suggest above.
If it's the former, then route those visitors to a specially created page on your site that tells them that you're blocking all traffic from the URL from which they came, and DON'T include a link back to your site. You'll still get people who will go through the process of viewing the source, typing in the exact URL, et cetera, et cetera; but you will block the bandwidth thieves.
☷ Lesli Schauf, TLM Network
☴ Linux and Windows Hosting: Scribehost
Okay, I got the powweb thing to work and for some reason it doesn't show my custom 403 page anyway, so there's no link. Phew.
Seriously, thanks a lot for the help and patience - I appreciate it. As for why I want to block traffic from a site in particular, I don't really want to get into a debate about the issue. Let's just say that I'd prefer if people didn't link to entries in my journal for the purposes of organizing harassment against me - and if they do, I don't think that I should have to take the entries down just to appease them.
But anyway, thanks for the help and support, like I said.