Category: Errata

WordPress: Doing Root the Right Way.

I’m going to try to keep this brief as I am not a big WordPress hacker.  For the most part WP just works and allows me to get on with what I really want to do which is write and interact.  When I first started StaticNAT.com I had all sorts of crazy ideas and to this day I still do.  But back then I had not clue how to really setup a blog, I just dove in and hoped for the best.  Well it turns out what how I did it is really not all that bad but I had just not configured everything in a way that was optimal.  So here is what I did.

On the Initial WordPress install I told the installer to use /staticant.com/WP/ as the directory for all my wordpress install files.  That is all well and good but I ended up having to go to www.staticnat.com/wp to get to my blog, and that was not so good.  The quick and dirty fix was to use an index.html file that looked just like this:

< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">StaticNAT


The problem was that it just ended up pointing back to http://test.staticnat.com and quite honestly thats ugly. As I have been cleaning up the site in preparation for all the cool new things we are adding I decided I needed to make a change even if it was painful. My plan was to backup my WP data and DB then create a new install of WP at /statincat.com/ the root directory for this site. After that was all done I would import all the old data re-install all my plugins re-create the Admin users and move on. But I was a bit concerned about how clean this would be especially from and SEO perspective.

Digging a bit I found out that the way I deployed five years ago was really not wrong and that WP had provisions already to live in a unique director but still present itself without the index.html file. So off I went to find out how to do it. What I found was this support forum post on DreamHosts site. This was convenient since Dreamhost is my web host so I was sure it would work out well.

To sum it all up for you what you have to do is go to Settings –> General –> and change the Site Address (URL) to http://www.staticnat.com. Once you have done that you have to create a .htaccess file and place it in both the /staticnat.com/WP and /staticnat.com/ folders. I did not like all of the things that were in the .htaaccess file that was shown in this forum article so I modified it to look like this;

# protect the htaccess file

order allow,deny
deny from all

# disable the server signature
ServerSignature Off

# limit file uploads to 10mb
LimitRequestBody 10240000

# protect wpconfig.php

order allow,deny
deny from all

#who has access who doesnt
order allow,deny
#deny from 000.000.000.000
allow from all

#custom error docs
ErrorDocument 404 /notfound.php
ErrorDocument 403 /forbidden.php
ErrorDocument 500 /error.php

# disable directory browsing
Options All -Indexes

# set the canonical url
RewriteEngine On
RewriteCond %{HTTP_HOST} ^staticnat.com$ [NC]
RewriteRule ^(.*)$ http://www.staticnat.com/$1 [R=301,L]

# BEGIN WordPress

# END WordPress

Then you have to copy the index.php files from /staticnat.com/WP to /staticnat.com/. That should be all there is to it. But for me it was not. I ended up having to go into the index.php files and change the following:

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');

TO

/** Loads the WordPress Environment and Template */
require('./WP/wp-blog-header.php');

That did it. I have a few custom links that are not working following the change but thats minor and should be resolved pretty quick. Keep in mind if you end up using this any of the references to www.staticnat.com should be replace with your domain name for it to work for you.

2012 What a Riot! And More Fun to Come

We have introduced a new blog series called a Few Easy Steps. This series is really what I always intended StaticNAT.com to be from when it started in 2007. I would highly recommend you check out this series and add us to your RSS reader, bookmarks or whatever means you use to remember to check us out from time to time. To date we have published 22 of these articles that allow the reader to walk away and do something right away with that they have just read. Most of these posts have been dealing with very entry level configurations steps around Cisco IOS devices. In the near future we have plans to extend this series not only into configuration of other networking devices but move into server configuration as well. Keep and eye out because there is much more to come.

Read more

REPOST: The lemming way…how Cisco jumped off the cliff.

So I was talking to one of my guys at work tonight and he indicated that my shots have Cisco have been a recent thing in my career.  I told him he was wrong and went back to a post that I had taken private.  It ends up being this post.  I want to start by saying I took this private when I went to a Cisco Gold VAR.  I did so because after this post I had seen some good indications of change and I felt like it was a bit to hard of a slap in the face for people who were in large part paying my salary.  That said after re-reading it I think I had lots of things right.  So without further adieu here is my original post Published on: May 11, 2007 @ 13:52 taken right from my WP Dashboard.  Enjoy! Read more