Forum Moderators: phranque

Message Too Old, No Replies

Blocking External Access

Blocking all but my own domain

         

LarryMorin

11:55 am on Aug 22, 2005 (gmt 0)

10+ Year Member



I'm hoping one of you guru's can help me do this in htaccess. It sounds simple, but I'm not at all familiar with htaccess.

Here's my setup.
Primary Domain & 5 Sub-Domains.
4 Sub-Domains have viewable content.

The last sub-domain is a storage facility for media (images, sounds, movies, etc.) served by the rest of my site. It has no actual content.

Can someone help me with the htaccess code to block every domain except my own primary and sub-domains from accessing the content on the last sub-domain?

I'm thinking that by allowing only my own domain to access the media, it should stop the hotlinkers, and sites that embed the media into the page serving it up.

I would also like to redirect the hotlinkers to a custom 403 without creating a loop.
This is what has kept me from experimenting.

jatar_k

9:29 pm on Sep 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



have you tried any code for the first bit yet? any results?

I realize the 403 is a little tough to experiment with. This should serve as a good bump for the apache gurus ;)