You are not logged in.

#1 29 Jun 2008 10:56 am

Butcher
Moderator
From: Norway
Registered: Jul 2006
Posts: 308

.htaccess to stop external use

Is it possible to use .htaccess files to stop other sites from including files (through php includes, iframes and the like), link to the site and can .htaccess files be appended through php?

Looking into blocking external sites from in any way exploit content on a site I'm building, as well as link directly to certain files. And develop a block/ban-system through banning IPs' in .htaccess (without having to actually open the file myself through FTP).


http://bamboocommandos.com/butcher_img/butchersig7.jpg

Offline

 

#2 30 Jun 2008 12:49 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: .htaccess to stop external use

yes you can.  I'm not an expert in apache's config stuff but I know for sure it's possible.  you may want to look for an apache users group and ask on the particulars of that.  I usually just mess around with it until I get something to work (with one page opened to my site, and another opened to apache's conf user documentation).

I wrote a spam script that worked across several of my sites, and when a hack attempt happened on one, it added denial entries on the other site's .htaccess files.

I ended up taking it off though once the file grew to several gig, and folks complained about not being able to access my site (cause apparently I'd blocked most of Asia).

Offline

 



© 2003 - 2024 NullFX
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License