Canonicalization Prevention Guide

Canonicalization, a computer science term, is used, especially by Google, to refer to the process of picking the best url when there are several choices. From an SEO perspective, it is important to avoid creation of duplicate content due to potential negative effects in search engine rankings.

Specific code snippets to resolve the problem in different situations have been widely discussed, but there is no … [ Read more ]

Identifying a Compromised Script Sending Spam from Your Server

When you use third party software programs, both open source and commercial, there is an increased possibility that they will have security flaws which are exploited. This is true because the programs are well-known, often make the source code publicly available, and because hackers realize that security holes in these programs will exist on a lot of servers.

Recently, I noticed that one … [ Read more ]

Fixing a HTTP Error 500 – Internal Server Error

The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site’s server but the server could not be more specific on what the exact problem is. When you receive such an error on your site, a good place to start your troubleshooting is with the error log, which can usually be accessed easily from … [ Read more ]

JavaScript Alert and Confirmation Boxes

An alert box is a small dialog box that provides a user with important information. The most common uses are to inform (“alert box”) the user about errors (e.g., especially with form validation), to provide simple help messages, or to require confirmation (“confirmation box”) before allowing certain website actions. You’ll often see the confirmation box used before the applications performs a task that cannot be … [ Read more ]

Ruby on Rails (RoR)

This site focuses on do-it-yourself webmasters who use PHP (as part of the LAMP infrastructure). Still, you will likely hear about something called Ruby on Rails (RoR), which is sometimes touted as a better alternative to using PHP.

Hivelogic’s Dan Benjamin has written a useful article, “Getting Started with Ruby on Rails,” from which you can learn what Ruby on Rails is (and … [ Read more ]

Setting Up / Moving Servers – A New Server Checklist

It probably seems logical that you should avoid moving servers if you can. Unfortunately, sometimes you just can’t avoid it. In that case there are some things you can do to make your experience more trouble-free.

The Easy Way to Migrate Servers

If you use cpanel or Plesk, each offers a migration tool. Use that tool on the new server to automatically transfer your entire domain from … [ Read more ]

CSS – Browser Differences

Most problems with modern CSS layout techniques have their origin in the way different browsers implement CSS. One useful tool to deal with these differences is Dean Edwards’ IE7 JavaScript library, which makes MSIE behave like a standards-compliant browser. This will solve a lot of other issues as well.

A common practice for dealing with cross-browser difficulties, especially with IE differences, is to include an … [ Read more ]

Web Site Security Checklist

I readily admit that I have a lot to learn about security issues, but I did recently come across the article “Ensure basic Web site security with this checklist” by Chad Perrin on TechRepublic. I think it will be as useful to you as it was to me.

PEAR::HTTP/Request

The PHP Extension and Application Repository, or PEAR, is a framework and distribution system for PHP code components. Stig S. Bakken founded the PEAR project in 1999 to promote the re-use of code that performs common functions. The project seeks to provide a structured library of code, maintain a system for distributing code and for managing code packages, and promote a standard coding style.

While PEAR … [ Read more ]

E-Mail Obfuscation

Most webmasters realize the importance of hiding e-mail addresses on our websites from e-mail address harvesting spam bots. Over the years, many methods have been used to address this problem. Many are simple reconfigurations of the text displayed so that only a human can perform the logical analysis to figure out the real address. These are of the form: [email protected], contact(at)company(dot)com, contact at company dot … [ Read more ]

What is RSS?

RSS (variously defined as Really Simple Syndication or Rich Site Summary) is a standard for publishing regular updates to web-based content. These updates are usually called “feeds.” RSS is most commonly associated with blogs but can (and should) be added to any website that regularly posts content. Webmasters use this standard to provide updates which users can view with RSS reader software (standalone or web-based). … [ Read more ]

Trackback: A Guide for Implementing Trackback on Your Site

Trackback is a framework for communication between web sites. The primary purpose of trackback is for one site to notify another about a related resource, for example a link to a blog post. This is done through a technique generally known as a ping, which can be used for communication purposes other than tracking as well, notably to tell blog feed aggregators that a … [ Read more ]

POST vs. GET Form Submission Method

There are two different submission methods for a form, the choice being specified inside a FORM element using the METHOD attribute. The difference between METHOD=”GET” (the default) and METHOD=”POST” is primarily defined in terms of form data encoding, where the GET method will pass all form data via a URL while the POST method will pass all form data internally. If you look at technical … [ Read more ]

AJAX Select Box (Other) Form Element

If you’re like me, you have certain form fields that need to allow users to add an option. For example, if you wanted to ask a user filling out a form for their university, you can’t realistically expect to have a table with all the possibilities from around the world. Instead, you can have what I call a select box other field (a.k.a. list box), … [ Read more ]

Functions and Passing by Reference

A function can be written to accept parameters (variable) or not. A parameter name is local to a function unless you tell it otherwise by using the global statement. Thus, you can pass a parameter called $string and name the accepted parameter $string also and they won’t interfere with each other. For example

In the function above, $string outside of the function will remain “car” … [ Read more ]

Ping

A ping, more formally known as an XML-RPC ping, is a method of allowing two websites to communicate with each other (via the XML-RPC specification). The most common use these days is for blog software to tell RSS feed directories and aggregators that a new feed has been published. If you aren’t using blog software for your site but would still like the ability … [ Read more ]

Modular Website Design

Modular design is pretty much what it sounds like – designing code modules that can be reused multiple times (i.e., on multiple pages or even multiple sites). The most obvious modules that may come to mind are the site’s header, footer and sidebar(s) but as you become more comfortable coding in this style you will quickly see many other opportunities to use modular design.

The first … [ Read more ]

Header

If it’s not intuitively obvious to you, having a modular header, just like a modular sidebar and footer, helps by allowing you to modify your site design with one code change that will ripple through all pages. For the header in particular, there are a few things you should know about.

!DOCTYPE

First and most importantly, make sure that you have the correct (X)HTML !DOCTYPE. This should … [ Read more ]