Modernizing a Web Site

A client wanted me to take their existing web site and add a content-management system (CMS) and a members-only area.

The site was made with Dreamweaver templates, which helped enforce some consistency. Unfortunately, the navigation was different on every single page. I think this was done so that pages within a section could show an expanded sub-navigation list. It also allowed every page’s corresponding navigation link to not be a link (i.e., be “selected” and not clickable.)

I decided to throw away the Dreamweaver templates and enforce my own consistency across the site, including the navigation. I knew I could write a getNavigation() function that could work on any page, and still handle the subnav and selected states.

The site had been made with table-based layouts, so I whipped up a quick grid using OOCSS that approximated the old site and used that for my new PHP template, along with the getNavigation function.

I converted the first file by hand to get a feel for how the work would go, and it probably took me 30 minutes. The next two or three went a little faster, and after a dozen, I was able to convert a page in about a minute. (I considered writing a script to do it for me, but that would have taken nearly as long, and I would not have the advantage of becoming familiar with each page on the site.)

I started keeping track of new page names in an apache .httaccess file. I wanted to redirect the old .html pages to the new .php pages with a 301 HTTP status code so that bookmarks and search rankings would not be adversely affected. Since the new pages could be called anything I wanted, I ended up just leaving the file name and changing the extension. The list began to grow, and I realized there should be a way to bulk-redirect these files. I knew Apache’s mod_rewrite could do it, but I didn’t remember whether rewriting was the same as redirecting with a 301. I found out that you can send a status code as you rewrite, so I deleted the long list and used a couple of RewriteRules instead.

That’s my progress so far, and you can hire me to do this for your web site as well. Contact me at the Boulder Information Services web site.

This entry was posted in Web programming and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s