Author Archives: admin

mod_rewrite to force www redirect index.php to domain

Here is a quick mod_rewrite example that forces www and redirects index.php to / (this fixes two canonicalization issues at one time).

?View Code PHPRewriteEngine on
RewriteCond %{HTTP_HOST} !^www.site.com$
RewriteRule ^/(.*)$ http://www.site.com/$1 [R=301]
RewriteRule ^/index\.php$ http://www.site.com/ [R=301,L]

Old Lady With Bag On Her Head

Old lady with bag on her head….
The crux of the whole thing is that she has an umbrella in her hand.. so why the bag old lady? Why??!!

PHP Code Get Most Recent Wordpress Post

PHP Code Get Most Recent Wordpress Post
This is a quick example using only vanilla PHP.  There are more dynamic ways to do this using RSS classes built into PHP addons, which I won’t go into detail here.  Instead, we will just use vanilla PHP, and parse the XML by hand.

On to the code, I take [...]