Monthly Archives: May 2011

Marking HTML5 <time> with PHP

The HTML5 <time> element can be confusing at first — as can its datetime attribute. But once you get used to its quirks, it’s fairly simple. It’s even simpler if you handle all those quirks with something like PHP! Basic Usage The first point to note is that if the text-content of your <time>… Read More

Posted in Web Development | Tagged , , | Leave a comment

Portable .htaccess Domain Rewriter (www/non-www)

How to use Apache .htaccess directives to tweak the “www.” domain prefix of your site’s URLs is a common problem, normally solved along these lines — <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.MyDomain\.com$ [NC] RewriteRule ^(.*)$ http://MyDomain\.com/$1 [R=301,L] </IfModule> But while the common solution is fine for MyDomain.com, you have to manually re-code it… Read More

Posted in Web Development | Tagged , , | Leave a comment