htaccess plugin

Creating and modifying plugins.
Post Reply
akremedy
Regular
Posts: 56
Joined: Sat Jul 26, 2008 9:06 am
Location: Bay Area, U.S.A.
Contact:

htaccess plugin

Post by akremedy »

Before I queue up another project (that I don't really have time for, but keenly interests me :-) ), are there hooks to write htaccess in S9Y already? I'm looking in /include/tpl and see htaccess stuff.

What I'm envisioning is an extension to Spamblock, or another plugin altogether, where a link next to the IP in the Admin > Comments area will add the comment IP to htaccess.

I'm mainly interested in blocking spam in trackbacks - most seem to be originating from the same (or similar) IP's. Taking this to the next level, I further envision being able to do something like like select "Exact IP" or "IP Range" (to add the obvious into htaccess).

Any thoughts?

Thanks,
Adam
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: htaccess plugin

Post by Don Chambers »

I have no idea where in the code it exists, but if you modify s9y's configuration for URL rewriting, it will write to htaccess. The spamblock plugin can also write to htaccess if configured to do so... it places banned IP addresses between the comment lines #SPAMDENY and #/SPAMDENY - so searching for that text in the source files should help you find it.

I'm sure Garvin can tell you the exact file(s) and line numbers, and I probably could too if I felt like looking, but I just stopped by the forum briefly to leave a PM and saw your post.
=Don=
akremedy
Regular
Posts: 56
Joined: Sat Jul 26, 2008 9:06 am
Location: Bay Area, U.S.A.
Contact:

Re: htaccess plugin

Post by akremedy »

Thanks Don, well it sounds like the spamblock plugin does what I want it to do after all - I just didn't look at it closely enough. Not sure why I didn't look before, but I see now the spamblocklog and spamblock_htaccess tables. I think this is going to work just the way I need it to and save me having to reinvent the wheel.

Thanks again!
Adam
Post Reply