4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Denying from a certain site
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
OgreINC
Junior WebHelper
Junior WebHelper


Joined: 07 Aug 2003
Posts: 15

PostPosted: Mon Aug 25, 2003 9:03 pm (20 years, 7 months ago) Reply with QuoteBack to Top

how could I edit htaccess file that if someone came from a certain site he couldnt gain access?
OfflineView User's ProfileFind all posts by OgreINCSend Personal MessageAOL Instant Messenger
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Mon Aug 25, 2003 11:17 pm (20 years, 7 months ago) Reply with QuoteBack to Top

you can do it with url rewriting:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://www.site1.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} ^http://www.site2.com/.*$      [NC]
RewriteRule .*\.(png|mpg|mpeg|asf|asx|wmv|mp3|rm)$ http://yoursite.com/deny.html [R,NC]


you can add as many sites to that as you want, and also as many file extenstions as you want. or, for any file you would have this as the last line:
Code:
RewriteRule .* http://yoursite.com/deny.html [R,NC]


just so you know, I'm not 100% sure about all that, but the first block of code is taken from someone's site and it definately works as intended Smile

________________________________
It's turtles all the way down...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
OgreINC
Junior WebHelper
Junior WebHelper


Joined: 07 Aug 2003
Posts: 15

PostPosted: Tue Aug 26, 2003 4:30 pm (20 years, 7 months ago) Reply with QuoteBack to Top

thanks
OfflineView User's ProfileFind all posts by OgreINCSend Personal MessageAOL Instant Messenger
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot 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.


Page generation time: 0.209534 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme