Archives

Deny Access to No Referrer Requests

When your readers comment, the wp-comments-post.php file is accessed, does its thing, and creates the post. The user’s browser will send a “referral” line about this.

When a spam-bot comes in, it hits the file directly and usually does not leave a referrer. This allows for some nifty detection and action direct from the server. If you are not familiar with Apache directives, then write the following in your root directory .htaccess file::

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourdomain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]

This will:

Detect when a POST is being made
Check to see if the post is on wp-comments-post.php
Check if the referrer is in your domain or if no referrer
Send the spam-bot BACK to its originating server’s IP address.
NOTE 1: In the 4th line, change yourdomain.com to your domain.xxx without the www or any prefix for that matter.
NOTE 2: There is a slim chance that someone’s browser will not send the referral, but this is extremely rare.

This essentially deflects the spam-bot back on itself.

Taken from WordPress Codex

Show Empty Table Cells with CSS in Internet Explorer

When you create a html table and apply a border using CSS, then the empty cells do not have a border. So you pull out your CSS book and find empty-cells:show; and think your problems are solved but empty-cells is unsupported in IE…go figure. But I have found a combination of styles that work. Try this…apply the border-collapse:collapse; and empty-cells: show; to the table level and IE will display borders around empty cells.

Tags:

Firefox and integrated Windows Authenication

If you need Firefox to work with integrated Windows Authentication do this:

  1. Open Firefox and go to about:config
  2. In the filter type network.automatic-ntlm-auth.trusted-uris or just scroll down until you find it.
  3. Double click that line and put in the name of the server you want to use windows auth. Ex: localhost,.tgrayimages.com (multiple sites separated by commas)
  4. Click OK and restart Firefox

Yipee! Now you can uninstall IE! (just kidding)

Those Who Can, Code; Those Who Can’t, Architect

A friend of mine sent me this email and it sent chills up my spine.

“At the moment there seems to be an extremely unhealthy obsession in software with the concept of architecture. A colleague of mine, a recent graduate, told me he wished to become a software architect. He was drawn to the glamour of being able to come up with grandiose ideas – sweeping generalized designs, creating presentations to audiences of acronym addicts, writing esoteric academic papers, speaking at conferences attended by headless engineers on company expense accounts hungrily seeking out this year’s grail, and creating e-mails with huge cc lists from people whose signature footer is more interesting than the content. I tried to re-orient him into actually doing some coding, to join a team that has a good product and keen users both of whom are pushing requirements forward, to no avail. Somehow the lure of being an architecture astronaut was too strong and I lost him to the dark side. Continue reading

Hasta la Vista, Vista!

I’ve had it up to here! While Windows Vista is cool and has some very neat new features, I could not take it anymore. It was killing my box! I could not click on anything without the pc choking and the system fan kicking in and all my window turning white for several seconds. My box is not the latest and greatest but it is by far not a wimp either. I was ready to throw the thing out the window. So I paid a visit to my very good friend “format c:” and reinstalled the trusted Windows XP MCE 2005 and my pc thanked me with a sigh of relief. The next upgrade I make with be of the fruity version, say maybe an Apple? Or maybe I should just run one of those fancy new web OSs and let every pc in the world be my pc.